[Coco] Semaphores in OS-9/6809?
John R. Hogerhuis
jhoger at pobox.com
Fri Sep 24 20:24:20 EDT 2004
Whenever I've written simple critical sections in C, it's just macros
where CRT_ENTER disables interrupts and increments the counter.
CRT_LEAVE decrements the counter. If it becomes zero, it enables
This way if you have two critical sections and invokes the other,
everything will still work properly.
This kind of critical section has to be very short of course since
interrupts are disabled for the duration. But higher level
synchronization primitives can be based on it.
More information about the Coco