next up previous contents index
Next: 3.10.36 xep Up: 3.10 Classes Previous: 3.10.34 thd   Contents   Index

Subsections


3.10.35 tsd

The tsd class implements thread-specific data. A tsd instance can be created, then any number of threads can use that same instance to store and retrieve a thread-specific pointer to data.

3.10.35.1 API

void tsd_new(cw_tsd_t *a_tsd, void (*a_func)(void *)):

Input(s):
a_tsd:
Pointer to space for a tsd.
a_func:
Pointer to a cleanup function, or NULL.
Output(s):
None.
Exception(s):
None.
Description:
Constructor.
void tsd_delete(cw_tsd_t *a_tsd):

Input(s):
a_tsd:
Pointer to a tsd.
Output(s):
None.
Exception(s):
None.
Description:
Destructor.
void * tsd_get(cw_tsd_t *a_tsd):

Input(s):
a_tsd:
Pointer to a tsd.
Output(s):
retval:
Pointer to thread-specific data.
Exception(s):
None.
Description:
Get thread-specific data pointer.
tsd_set(cw_tsd_t *a_tsd, void *a_val):

Input(s):
a_tsd:
Pointer to a tsd.
a_val:
Pointer to thread-specific data.
Output(s):
None.
Exception(s):
None.
Description:
Set thread-specific data pointer.


next up previous contents index
Next: 3.10.36 xep Up: 3.10 Classes Previous: 3.10.34 thd   Contents   Index
Jason Evans 2002-03-30