#include <cpu_lock.h>
Public Types | |
typedef Mword | Status |
The return type of test methods. | |
Public Member Functions | |
Cpu_lock () | |
ctor. | |
Status | test () const |
Test if the lock is already held. | |
void | lock () |
Acquire the CPU lock. | |
void | clear () |
Release the CPU lock. | |
Status | test_and_set () |
Acquire the CPU lock and return the old status. | |
void | set (Status state) |
Set the CPU lock according to the given status. | |
Private Member Functions | |
Cpu_lock (const Cpu_lock &) | |
Default copy constructor not implemented. |
When held, irqs are disabled on the current CPU (preventing nested irq handling, and preventing the current thread from being preempted). It must only be held for very short amounts of time.
A generic (cli, sti) implementation of the lock can be found in cpu_lock-generic.cpp.
|
The return type of test methods.
|
|
ctor.
|
|
Default copy constructor not implemented.
|
|
Release the CPU lock.
|
|
Acquire the CPU lock. The CPU lock disables IRQ's it should be held only for a very short amount of time. |
|
Set the CPU lock according to the given status.
|
|
Test if the lock is already held.
|
|
Acquire the CPU lock and return the old status.
|