|
Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <Lock.h>
POSIX Threads locks.
Mediate access to a critical section by enforcing mutual exclusion.
Properties | |
| Object | object |
| The superclass. More... | |
Properties inherited from Object | |
| Class * | clazz |
| Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
| Class * | _Lock (void) |
| The Lock archetype. More... | |
| Lock * | init (Lock *self) |
| Initializes this Lock. More... | |
| void | lock (Lock *self) |
| Acquire this lock, waiting indefinitely. More... | |
| _Bool | tryLock (Lock *self) |
| Attempt to acquire this lock immediately. More... | |
| void | unlock (Lock *self) |
| Release this Lock. More... | |
Methods inherited from Object | |
| Class * | _Object (void) |
| The Object archetype. More... | |
| Object * | copy (const Object *self) |
| Creates a shallow copy of this Object. More... | |
| void | dealloc (Object *self) |
| Frees all resources held by this Object. More... | |
| String * | description (const Object *self) |
| int | hash (const Object *self) |
| Object * | init (Object *self) |
| Initializes this Object. More... | |
| _Bool | isEqual (const Object *self, const Object *other) |
| Tests equality of the other Object. More... | |
| _Bool | isKindOfClass (const Object *self, const Class *clazz) |
| Tests for Class hierarchy membership. More... | |
Protected Attributes | |
| LockInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. More... | |
| Class * _Lock | ( | void | ) |
The Lock archetype.
Definition at line 129 of file Lock.c.
Initializes this Lock.
| self | The Lock. |
NULL on error. Definition at line 62 of file Lock.c.
| void lock | ( | Lock * | self | ) |
| _Bool tryLock | ( | Lock * | self | ) |
| void unlock | ( | Lock * | self | ) |