|
PatchworkOS
19e446b
A non-POSIX operating system.
|
Reference counting structure. More...
#include <ref.h>
Data Fields | |
| uint32_t | magic |
| atomic_uint32_t | count |
| lock_t | lock |
| void(* | callback )(void *self) |
| Cleanup function called when count reaches zero. | |
| list_t | weakRefs |
Reference counting structure.
Provides a generic interface for reference counting. Must be placed as the first element in any struct that requires reference counting.
| void(* ref_t::callback) (void *self) |