Go to the source code of this file.
◆ m0_ref_get()
M0_INTERNAL void m0_ref_get |
( |
struct m0_ref * |
ref | ) |
|
take one reference to the object
- Parameters
-
- Returns
- none
Definition at line 32 of file refs.c.
◆ m0_ref_init()
void m0_ref_init |
( |
struct m0_ref * |
ref, |
|
|
int |
init_num, |
|
|
void(*)(struct m0_ref *ref) |
release |
|
) |
| |
constructor for init reference counted protection
- Parameters
-
ref | pointer to m0_ref object |
init_num | initial references on object |
release | destructor function for the object |
Definition at line 24 of file refs.c.
◆ m0_ref_put()
M0_INTERNAL void m0_ref_put |
( |
struct m0_ref * |
ref | ) |
|
Release one reference from the object. If function will release last reference, destructor will called.
- Parameters
-
- Returns
- none
Definition at line 38 of file refs.c.
◆ m0_ref_read()
M0_INTERNAL int64_t m0_ref_read |
( |
const struct m0_ref * |
ref | ) |
|
Read the current value of the reference count from the m0_ref object
- Parameters
-
- Returns
- current value of the reference count
Definition at line 44 of file refs.c.