DTS Application Library  0.2.3
Application library containing referenced objects and interfaces to common libraries
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ref_obj Struct Reference

Internal structure of all referenced objects. More...

Data Fields

uint32_t magic
 Memory integrity check used to prevent non refeferenced objects been handled as referenced objects. More...
 
uint32_t cnt
 Reference count the oject will be freed when the reference count reaches 0. More...
 
size_t size
 The size allocated to this object. More...
 
pthread_mutex_t lock
 this is a pointer to the lock it may be changed to be the lock More...
 
objdestroy destroy
 Function to call to clean up the data before its freed. More...
 
void * data
 Pointer to the data referenced. More...
 

Detailed Description

Internal structure of all referenced objects.

Definition at line 38 of file refobj.c.

Field Documentation

uint32_t ref_obj::cnt

Reference count the oject will be freed when the reference count reaches 0.

Definition at line 45 of file refobj.c.

Referenced by objalloc(), objcnt(), objref(), and objunref().

void* ref_obj::data
objdestroy ref_obj::destroy

Function to call to clean up the data before its freed.

Definition at line 52 of file refobj.c.

Referenced by objalloc(), and objunref().

pthread_mutex_t ref_obj::lock

this is a pointer to the lock it may be changed to be the lock

Definition at line 50 of file refobj.c.

Referenced by objalloc(), objcnt(), objlock(), objref(), objsize(), objtrylock(), objunlock(), and objunref().

uint32_t ref_obj::magic

Memory integrity check used to prevent non refeferenced objects been handled as referenced objects.

See Also
REFOBJ_MAGIC

Definition at line 42 of file refobj.c.

Referenced by objalloc(), objcnt(), objlock(), objref(), objsize(), objtrylock(), objunlock(), and objunref().

size_t ref_obj::size

The size allocated to this object.

Warning
this may be removed in future.

Definition at line 48 of file refobj.c.

Referenced by objalloc(), objsize(), and objunref().


The documentation for this struct was generated from the following file: