user/lib/libsystem/src/sys/task.c
/**
 * Creates a new task; its parent is the given task.
 *
 * The kernel may perform validation to ensure the caller has the rights to add child tasks to the
 * provided task handle. A task handle of 0 indicates the calling task.
 */
Creates a new task; its parent is the given task.
The kernel may perform validation to ensure the caller has the rights to add child tasks to the
provided task handle. A task handle of 0 indicates the calling task.
Creates a new task ; its parent is the given task . The kernel may perform validation to ensure the caller has the rights to add child tasks to the provided task handle . A task handle of 0 indicates the calling task .
int TaskCreateWithParent(const uintptr_t parent, uintptr_t *outHandle) {
    if(!outHandle) {
        return -1;
    }
    intptr_t err = __do_syscall1(parent, SYS_TASK_CREATE);
    if(err > 0) {
        *outHandle = err;
        return 0;
    } else {
        return err;
    }
}
int TaskCreateWithParent ( const uintptr_t parent , uintptr_t * outHandle ) { if ( ! outHandle ) { return -1 ; } intptr_t err = __do_syscall1 ( parent , SYS_TASK_CREATE ) ; if ( err > 0 ) { * outHandle = err ; return 0 ; } else { return err ; } }
Creates a new task; its parent is the given task.
Creates a new task ; its parent is the given task .