Fixed SYS_ARCH_PROTECT macros when NO_SYS is not defined.

Added documentation for lightweight protection.

Fixed debug statement in ip.c.

Removed tabs in files I changed.
This commit is contained in:
davidhaas
2003-02-18 21:14:16 +00:00
parent 7f1becc682
commit e13c78820f
3 changed files with 89 additions and 40 deletions

View File

@@ -121,3 +121,26 @@ to be implemented as well:
"thread()". The "arg" argument will be passed as an argument to the
thread() function. The id of the new thread is returned.
- sys_prot_t sys_arch_protect(void)
This optional function does a "fast" critical region protection and returns
the previous protection level. This function is only called during very short
critical regions. An embedded system which supports ISR-based drivers might
want to implement this function by disabling interrupts. Task-based systems
might want to implement this by using a mutex or disabling tasking. This
function should support recursive calls from the same task or interrupt. In
other words, sys_arch_protect() could be called while already protected. In
that case the return value indicates that it is already protected.
sys_arch_protect() is only required if your port is supporting an operating
system.
- void sys_arch_unprotect(sys_prot_t pval)
This optional function does a "fast" set of critical region protection to the
value specified by pval. See the documentation for sys_arch_protect() for
more information. This function is only required if your port is supporting
an operating system.