Go to the documentation of this file.
13 #ifndef __CRITICALSECTIONBLOCK_H
14 #define __CRITICALSECTIONBLOCK_H
131 #define synchronized(cs) for(CriticalSectionBlock __currentlocked(cs);__currentlocked.checkonce();)
CriticalSectionBlock(critsec_t *critsec)
Constructor locks the critical section.
A CriticalSectionBlock locks a critical section for the lifetime of the CriticalSectionBlock.
critical section data structure
char _checkonceHackCounter
little hack, to make it possible to implement the synchronized() macro with the for(;;) loop below.
#define leave_critical_section(cs)
leave critical section
~CriticalSectionBlock()
destructor automatically unlocks the critical section.
int enter_critical_section(critsec_t *cs)
lock a critical section, or wait until it is available.
bool checkonce()
don't use.
Generated for brickOS Kernel Developer by
1.8.16