thread_create2(2)

DESCRIPTION

Create a user thread with two arguments.

Creates a thread and passes both arguments directly to entry on the
supplied aligned user stack.

SYNOPSIS

long thread_create2(void (*entry)(void *, void *), void *stack_top, void
    *argument0, void *argument1);

RETURN VALUE

  • Returns the new thread ID or a negative errno.

ERRORS

  • -EAGAIN
    • The thread limit or memory limit was reached.
  • -EFAULT
    • The entry point, stack, or argument pointer is invalid.
  • -ESRCH
    • There is no current process.