#include <config.h>
#include <sys/tm.h>
#include <atomic.h>
Include dependency graph for critsec.h:
Go to the source code of this file.
Defines | |
#define | __critsec_h__ |
#define | locked_decrement(counter) atomic_dec(counter) |
don't use locked_decrement anymore but atomic_dec() | |
#define | initialize_critical_section(cs) (cs)->count=0 |
initialize critical section | |
#define | leave_critical_section(cs) atomic_dec(&(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 | |
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.
|
|
don't use locked_decrement anymore but atomic_dec()
|
|
critical section type definition
|
|
enter critical section block other tasks if they attempt to enter a region of code protected by the same critical section.
|
|
wakeup when critical section is available wakeup function used to sleep a task until a critical section is available. called while processing an interrupt, so interrupts are already disabled.
|
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |