Synopsis

#include <sys/threads>

int beginthreadex(void (*start)(void *), unsigned int priority, void *stack, unsigned int stacksz, void *arg, handle_t *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