9.86 gettidid/settidid

int gettidid(int tid, char *id, size_t size);
int settidid(int tid, char *id, size_t size);

This syscall gets or sets the passed thread’s ID. An ID is an array associated with a thread for debug purposes. A thread is given no ID at creation, and fetching it will fail. The ID is a C-style string.

These syscalls returns 0 on success or -1 on failure, with the errno:

EINVAL

The passed buffers were either too big for setting, or to small for fetching the ID, or the passed thread is not valid.

EFAULT

The passed buffers were pointing to invalid memory.