Functions | |
int | names_register (const char *name) |
Register the current thread with the given name. | |
int | names_query_id (const l4_threadid_t id, char *name, const int length) |
Get the name registered for a thread ID. | |
int | names_unregister (const char *name) |
Unregister a given name. | |
int | names_query_name (const char *name, l4_threadid_t *id) |
Get the thread ID registered for a given name. | |
int | names_unregister_task (l4_threadid_t tid) |
Unregister all names registered for a given task. | |
int | names_query_nr (const int nr, char *name, const int length, l4_threadid_t *id) |
Query the entry of the given number. | |
int | names_waitfor_name (const char *name, l4_threadid_t *id, const int timeout) |
Repeatedly query for a given name. |
The function-prototypes can be found in <l4/names/libnames.>.
int names_query_id | ( | const l4_threadid_t | id, | |
char * | name, | |||
const int | length | |||
) |
Get the name registered for a thread ID.
id | The thread ID the name should be returned for. | |
name | Pointer to a preallocated area of memory. May be NULL. | |
length | Size of the area at name |
0 | Error. The thread ID was not being registered before. | |
!=0 | Success. |
References names_get_ns_id(), and NAMES_MAX_NAME_LEN.
int names_query_name | ( | const char * | name, | |
l4_threadid_t * | id | |||
) |
Get the thread ID registered for a given name.
name | 0-terminated name the ID should be returned for. | |
id | Thread ID of the name. May be NULL. |
0 | Error. The name was not being registered before. | |
!=0 | Success. |
References names_get_ns_id().
Referenced by names_waitfor_name().
int names_query_nr | ( | const int | nr, | |
char * | name, | |||
const int | length, | |||
l4_threadid_t * | id | |||
) |
Query the entry of the given number.
nr | The nr the name and thread ID should be returned for. | |
name | Pointer to a preallocated area of memory. May be NULL. | |
length | Size of the area at name. | |
id | Thread ID of the entry number nr. May be NULL. |
0 | Error. The entry with the given number is not valid. | |
!=0 | Success. |
References names_get_ns_id(), and NAMES_MAX_NAME_LEN.
int names_register | ( | const char * | name | ) |
Register the current thread with the given name.
name | 0-terminated name to register as. |
0 | Error. Name is already registerd. | |
!=0 | Success. |
References names_get_ns_id().
int names_unregister | ( | const char * | name | ) |
Unregister a given name.
name | 0-terminated name to unregister. |
0 | Error. Name is not registerd. | |
!=0 | Success. |
References names_get_ns_id().
int names_unregister_task | ( | l4_threadid_t | tid | ) |
Unregister all names registered for a given task.
tid | contains the task ID to unregister |
0 | Error. No entry found matching the given task. | |
!=0 | Success. At least one entry matching the given task found. |
References names_get_ns_id().
int names_waitfor_name | ( | const char * | name, | |
l4_threadid_t * | id, | |||
const int | timeout | |||
) |
Repeatedly query for a given name.
name | 0-terminated name the ID should be returned for. | |
id | thread ID will be stored here. | |
timeout | timeout in ms, |
0 | Error. The name was not registered within the timeout. | |
!=0 | Success. |
References names_query_name().