Library of Assembled Shared Sources
|
Lean and mean synchronisation object, without OS support. More...
#include <rw_lock.h>
Lean and mean synchronisation object, without OS support.
This lock is built upon atomic operations that are programmed in assembly. It makes a difference between reading and writing. A maximum number of readers is allowed while only 1 writer is allowed. The writer will only enter if there are no readers are reading at the same moment. This RWLock is a blocking and spinning synchronization object. Priority is given over writers, as soon as a writer is trying to enter, only one subsequent reader will in worst case be able to enter.