Creates a new thread executing the function func
. The function is invoked as func(arg).
If successful, the object pointed to by thr
is set to the identifier of the new thread.
The completion of this function synchronizes-with the beginning of the thread.
[edit] Parameters thr - pointer to memory location to put the identifier of the new thread func - function to execute arg - argument to pass to the function [edit] Return valuethrd_success if the creation of the new thread was successful. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another error occurred.
[edit] NotesThe thread identifiers may be reused for new threads once the thread has finished and joined or detached.
The type thrd_start_t is a typedef of int(*)(void*), which differs from the POSIX equivalent void*(*)(void*)
All thread-specific storage values (see tss_create) are initialized to NULL.
Return from the function func
is equivalent to calling thrd_exit with the argument equal to the return value of func
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4