A synchronization primitive. Use _pn_spinlock instead of this.
More...
#include <paranut.h>
A synchronization primitive. Use _pn_spinlock instead of this.
A simple implementation of a synchronization primitive. Might be used for implementing POSIX Threads later on.
- Warning
- You are not supposed to touch anything in this struct, which is why you can't see anything about the members in this documentation.
- Attention
- I highly recommend to not put locks on stack. The reason is that the stack (or at least a part of it) will be copied when putting the ParaNut into threaded Mode (see pn_begin_threaded()). In other words, if you put a lock on stack, it will be copied, and the new instances of the lock will be available per core. You should make it static, global or get the memory by allocation.
- Warning
- Atomic memory operations are not possible on a disabled cache.
The documentation for this struct was generated from the following file: