proc_forbid(): extensively document why we don't need locking
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 29 Aug 2008 19:56:18 +0000 (19:56 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 29 Aug 2008 19:56:18 +0000 (19:56 +0000)
commitd29f71dcdf6cb2e0269de54198f26f68162de500
treeb036a69506e956e142e729800a1eff6b1e7d10af
parent4cbfaee417caa6b62753cfa5505cd04ed096f3c3
proc_forbid(): extensively document why we don't need locking

Also change the ASSERT() in proc_permit() to check for != 0, as a
workaround for CPUs like the AVR which are unable to write an int to
memory atomically.

A better fix would be changing the type of preempt_forbid_cnt to
cpu_stack_t or a new type cpu_atomic_t.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1755 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/kern/proc.h