Creates a new kernel thread in the calling process.
#include <sys/thread.h>
tid_t thread_create ()
The thread_create kernel service creates a new kernel-only thread in the calling process. The thread's ID is returned; it is unique system wide.
The new thread does not begin running immediately; its state is set to TSIDL. The execution will start after a call to the kthread_start kernel service. If the process is exited prior to the thread being made runnable, the thread's resources are released immediately. The thread's signal mask is inherited from the calling thread; the set of pending signals is cleared. Signals sent to the thread are marked pending while the thread is in the TSIDL state.
If the calling thread is bound to a specific processor, the new thread will also be bound to the processor.
The thread_create kernel service can be called from the process environment only.
Upon successful completion, the new thread's ID is returned. Otherwise, -1 is returned, and the error code can be checked by calling the getuerror kernel service.
The thread_create kernel service is part of the Base Operating System (BOS) Runtime.
The kthread_start kernel service.
Process and Exception Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.