Section: libcprops - cp_heap (3)
Updated: JULY 2006
Return to Main Contents
cp_heap_lock, cp_heap_unlock - lock / unlock a heap for transaction like
int cp_heap_lock(cp_heap *heap, int type);
int cp_heap_unlock(cp_heap *heap);
Unless the mode bit COLLECTION_MODE_NOSYNC is set, heap operation are
synchronized, i.e. prevent simultaneous access from multiple threads.
cp_heap_lock is needed to perform a transaction-like operation consisting
multiple heap operations that must complete before other threads are allowed
access. cp_heap_lock locks the heap so that only the current thread can perform
heap operations, and cp_heap_unlock releases the lock.
cp_heap_lock and cp_heap_unlock return 0 on success or non-zero on failure.
- RETURN VALUE
- SEE ALSO
This document was created by
using the manual pages.
Time: 10:58:19 GMT, July 29, 2006