#include <config.h>
#include <sys/tm.h>
Include dependency graph for critsec.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Compounds | |
| struct | critsec |
| critical section data structure More... | |
Defines | |
| #define | __critsec_h__ |
| #define | initialize_critical_section(cs) (cs)->count=0 |
| initialize critical section | |
| #define | leave_critical_section(cs) locked_decrement(&(cs)->count) |
| leave critical section | |
| #define | destroy_critical_section(cs) |
| destroy critical section (does nothing) | |
Typedefs | |
| typedef critsec | critsec_t |
| critical section type definition | |
Functions | |
| int | locked_decrement (unsigned char *counter) |
| decrement counter without interruption | |
| wakeup_t | wait_critical_section (wakeup_t data) |
| wakeup when critical section is available | |
| int | enter_critical_section (critsec_t *cs) |
| enter critical section | |
Definition in file critsec.h.
|
|
|
|
|
destroy critical section (does nothing) currently there are no resources that are dynamically allocated.
|
|
|
initialize critical section sets count field of critical section to zero
|
|
|
leave critical section allow other tasks to enter critical regions of code protected by this critical section.
|
|
|
critical section type definition
|
|
|
enter critical section check and lock critical section if it is available; otherwise, wait until it is available, then lock it.
Definition at line 144 of file critsec.c. References critsec::count, locked_check_and_increment(), critsec::task, wait_critical_section(), wait_event(), and wakeup_t. |
|
|
decrement counter without interruption locks interrupts except NMI, decrements count then restores interrupts.
|
|
|
wakeup when critical section is available wakeup function used to detect when a critical section is available. called while processing an interrupt, so interrupts are already disabled. Definition at line 126 of file critsec.c. References critsec::count, locked_check_and_increment(), critsec::task, and wakeup_t. Referenced by enter_critical_section(). |
|
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |
1.3.2