Lines Matching refs:tsk

39     struct process_control_block *tsk = NULL;  in do_fork()  local
42 tsk = (struct process_control_block *)kzalloc(STACK_SIZE, 0); in do_fork()
45 if (tsk == NULL) in do_fork()
52 memset(tsk, 0, sizeof(struct process_control_block)); in do_fork()
55 memcpy(tsk, current_pcb, sizeof(struct process_control_block)); in do_fork()
56 tsk->worker_private = NULL; in do_fork()
60 list_init(&tsk->list); in do_fork()
65 tsk->flags |= PF_KFORK; in do_fork()
67 if (tsk->flags & PF_KTHREAD) in do_fork()
70 retval = kthread_set_worker_private(tsk); in do_fork()
73 tsk->virtual_runtime = 0; in do_fork()
75 tsk->priority = 2; in do_fork()
76 tsk->preempt_count = 0; in do_fork()
80 tsk->pid = process_global_pid++; in do_fork()
84 tsk->prev_pcb = &initial_proc_union.pcb; in do_fork()
86 tsk->next_pcb = initial_proc_union.pcb.next_pcb; in do_fork()
88 initial_proc_union.pcb.next_pcb = tsk; in do_fork()
90 tsk->parent_pcb = current_pcb; in do_fork()
95 tsk->cpu_id = proc_current_cpu_id; in do_fork()
96 tsk->state = PROC_UNINTERRUPTIBLE; in do_fork()
98 tsk->parent_pcb = current_pcb; in do_fork()
99 wait_queue_init(&tsk->wait_child_proc_exit, NULL); in do_fork()
101 list_init(&tsk->list); in do_fork()
106 retval = process_copy_flags(clone_flags, tsk); in do_fork()
111 retval = process_copy_mm(clone_flags, tsk); in do_fork()
116 retval = process_copy_files(clone_flags, tsk); in do_fork()
121 retval = process_copy_sighand(clone_flags, tsk); in do_fork()
125 retval = process_copy_signal(clone_flags, tsk); in do_fork()
130 retval = process_copy_thread(clone_flags, tsk, stack_start, stack_size, regs); in do_fork()
135 retval = tsk->pid; in do_fork()
137 tsk->flags &= ~PF_KFORK; in do_fork()
140 rs_procfs_register_pid(tsk->pid); in do_fork()
143 process_wakeup(tsk); in do_fork()
149 process_exit_thread(tsk); in do_fork()
152 process_exit_files(tsk); in do_fork()
153 rs_procfs_unregister_pid(tsk->pid); in do_fork()
155 process_exit_sighand(tsk); in do_fork()
157 process_exit_signal(tsk); in do_fork()
160 process_exit_mm(tsk); in do_fork()
162 kfree(tsk); in do_fork()