|
rlib
Convenience library for useful things
|
Hazard pointers — safe reclamation for lock-free reads. More...
Go to the source code of this file.
Data Structures | |
| struct | rhzrptr |
| Pointer slot that participates in hazard-pointer reclamation. More... | |
Macros | |
| #define | R_HZR_PTR_INIT(notify) { 0, (RDestroyNotify)notify } |
Static initialiser for an rhzrptr with destroy notifier notify. | |
Typedefs | |
| typedef struct RHzrPtrRec | RHzrPtrRec |
| Opaque per-thread hazard record. | |
Functions | |
| rpointer | r_hzr_ptr_acquire (rhzrptr *hzrptr, RHzrPtrRec *rec) |
Publish a hazard for the current value of hzrptr and return it. | |
| void | r_hzr_ptr_release (rhzrptr *hzrptr, RHzrPtrRec *rec) |
| Drop the hazard published by a previous r_hzr_ptr_acquire. | |
| void | r_hzr_ptr_replace (rhzrptr *hzrptr, rpointer ptr) |
Atomically replace hzrptr's value with ptr and schedule the displaced value for delayed reclamation. | |
| RHzrPtrRec * | r_hzr_ptr_rec_new (void) |
| Allocate a per-thread hazard record. | |
| void | r_hzr_ptr_rec_free (RHzrPtrRec *rec) |
| Free a per-thread hazard record at thread exit. | |
Hazard pointers — safe reclamation for lock-free reads.