Synopsis

#include <sys/threads>

int phThreadBegin(void *start, unsigned int priority, void *stack, unsigned int stacksz, void *arg, unsigned int *id);

Description

This function creates new thread.

start - endpoint of a thread
priority - thread priority (0-7), where zero is the highest priority
stack - user stack buffor begining
stacksz - user stack size
arg - argument to be passed to createthread() function

Return value

EOK in case of success

Errors

ENOMEM if not enough memory
EINVAL if invalid argument