Lines Matching refs:new_lwp
442 rt_lwp_t new_lwp = rt_calloc(1, sizeof(struct rt_lwp)); in lwp_create() local
444 if (new_lwp) in lwp_create()
447 new_lwp->ref = 1; in lwp_create()
449 new_lwp->bind_cpu = RT_CPUS_NR; in lwp_create()
451 new_lwp->exe_file = RT_NULL; in lwp_create()
452 rt_list_init(&new_lwp->t_grp); in lwp_create()
453 rt_list_init(&new_lwp->pgrp_node); in lwp_create()
454 rt_list_init(&new_lwp->timer); in lwp_create()
455 lwp_user_object_lock_init(new_lwp); in lwp_create()
456 rt_wqueue_init(&new_lwp->wait_queue); in lwp_create()
457 rt_wqueue_init(&new_lwp->waitpid_waiters); in lwp_create()
458 lwp_signal_init(&new_lwp->signal); in lwp_create()
459 rt_mutex_init(&new_lwp->lwp_lock, "lwp_lock", RT_IPC_FLAG_PRIO); in lwp_create()
462 new_lwp->did_exec = RT_TRUE; in lwp_create()
471 lwp_user_object_lock_destroy(new_lwp); in lwp_create()
472 rt_free(new_lwp); in lwp_create()
473 new_lwp = RT_NULL; in lwp_create()
478 new_lwp->pid = pid; in lwp_create()
479 lwp_pid_set_lwp_locked(pid, new_lwp); in lwp_create()
483 rt_memset(&new_lwp->rt_rusage,0, sizeof(new_lwp->rt_rusage)); in lwp_create()
487 rt_err_t error = lwp_user_space_init(new_lwp, 0); in lwp_create()
490 lwp_pid_put(new_lwp); in lwp_create()
491 lwp_user_object_lock_destroy(new_lwp); in lwp_create()
492 rt_free(new_lwp); in lwp_create()
493 new_lwp = RT_NULL; in lwp_create()
499 LOG_D("%s(pid=%d) => %p", __func__, new_lwp ? new_lwp->pid : -1, new_lwp); in lwp_create()
500 return new_lwp; in lwp_create()