Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ref.h File Reference

Go to the source code of this file.

Functions

int tipc_ref_table_init (u32 requested_size, u32 start)
 
void tipc_ref_table_stop (void)
 
u32 tipc_ref_acquire (void *object, spinlock_t **lock)
 
void tipc_ref_discard (u32 ref)
 
voidtipc_ref_lock (u32 ref)
 
voidtipc_ref_deref (u32 ref)
 

Function Documentation

u32 tipc_ref_acquire ( void object,
spinlock_t **  lock 
)

tipc_ref_acquire - create reference to an object

Register an object pointer in reference table and lock the object. Returns a unique reference value that is used from then on to retrieve the object pointer, or to determine that the object has been deregistered.

Note: The object is returned in the locked state so that the caller can register a partially initialized object, without running the risk that the object will be accessed before initialization is complete.

Definition at line 147 of file ref.c.

void* tipc_ref_deref ( u32  ref)

tipc_ref_deref - return pointer referenced object (without locking it)

Definition at line 275 of file ref.c.

void tipc_ref_discard ( u32  ref)

tipc_ref_discard - invalidate references to an object

Disallow future references to an object and free up the entry for re-use. Note: The entry's spin_lock may still be busy after discard

Definition at line 207 of file ref.c.

void* tipc_ref_lock ( u32  ref)

tipc_ref_lock - lock referenced object and return pointer to it

Definition at line 254 of file ref.c.

int tipc_ref_table_init ( u32  requested_size,
u32  start 
)

tipc_ref_table_init - create reference table for objects

Definition at line 97 of file ref.c.

void tipc_ref_table_stop ( void  )

tipc_ref_table_stop - destroy reference table for objects

Definition at line 127 of file ref.c.