Introduction   API Reference   Examples   Index  

Thread data
[L4 Thread Library API Reference]


Functions

L4_CV int l4thread_data_allocate_key (void)
 Allocate new data key.
L4_CV void l4thread_data_release_key (int key)
 Release data key.
L4_CV int l4thread_data_set_current (int key, void *data)
 Set data pointer for current thread.
L4_CV void * l4thread_data_get_current (int key)
 Get data pointer for current thread.
L4_CV int l4thread_data_set (l4thread_t thread, int key, void *data)
 Set data pointer.
L4_CV void * l4thread_data_get (l4thread_t thread, int key)
 Get data pointer.

Function Documentation

L4_CV int l4thread_data_allocate_key ( void   ) 

Allocate new data key.

Returns:
New data key, -L4_ENOKEY if no key available.

L4_CV void l4thread_data_release_key ( int  key  ) 

Release data key.

Parameters:
key data key

L4_CV int l4thread_data_set_current ( int  key,
void *  data 
)

Set data pointer for current thread.

Parameters:
key data key
data data pointer
Returns:
0 on success, -L4_EINVAL if invalid or unused data key.

L4_CV void* l4thread_data_get_current ( int  key  ) 

Get data pointer for current thread.

Parameters:
key data key
Returns:
Data pointer, NULL if invalid or unused data key.

L4_CV int l4thread_data_set ( l4thread_t  thread,
int  key,
void *  data 
)

Set data pointer.

Parameters:
thread thread id
key data key
data data pointer
Returns:
0 on success, -L4_EINVAL if invalid or unused data key / thread.

L4_CV void* l4thread_data_get ( l4thread_t  thread,
int  key 
)

Get data pointer.

Parameters:
thread thread id
key data key
Returns:
Data pointer, NULL if invalid or unused data key / thread.


L4 Thread Library Reference Manual, written by Lars Reuther  © 2000-2003