sys_arch_protect() and sys_arch_unprotect() is always called in pairs with
call order maintained. From rtos prospective, you can consider
sys_arch_protect() as enter_critical_section() and sys_arch_unprotect() as
exit_critical_section(). These calls might already be provided by rtos
you're using.
A couple questions about sys_arch_protect/unprotect
1. Are protect/unprotect calls required to nest?
2. Does the level passed to unprotect() have to do something?
I think I've found another instance where the original authors of my
sys_arch.c implemented something that meets the requirements