|
| static void | acquire (pthread_mutex_t *lock) |
| | Convenience function to acquire os native mutex lock directly.
|
| static void | indexing (unsigned size) |
| | Specify hash table size for guard protection.
|
| static bool | protect (const void *pointer) |
| | Specify pointer/object/resource to guard protect.
|
| static bool | release (const void *pointer) |
| | Specify a pointer/object/resource to release.
|
| static void | release (pthread_mutex_t *lock) |
| | Convenience function to release os native mutex lock directly.
|
Generic non-recursive exclusive lock class.
This class also impliments the exclusive_lock protocol. In addition, an interface is offered to support dynamically managed mutexes which are internally pooled. These can be used to protect and serialize arbitrary access to memory and objects on demand. This offers an advantage over embedding mutexes to serialize access to individual objects since the maximum number of mutexes will never be greater than the number of actually running threads rather than the number of objects being potentially protected. The ability to hash the pointer address into an indexed table further optimizes access by reducing the chance for collisions on the primary index mutex.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 459 of file thread.h.