Lines Matching refs:thread
40 stack_setup (struct __pthread *thread, in stack_setup() argument
47 bottom = thread->stackaddr; in stack_setup()
48 top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize in stack_setup()
49 + ((thread->guardsize + __vm_page_size - 1) in stack_setup()
59 top[0] = (uintptr_t) thread; in stack_setup()
63 if (thread->guardsize) in stack_setup()
66 thread->guardsize, 0, 0); in stack_setup()
74 __pthread_setup (struct __pthread *thread, in __pthread_setup() argument
83 thread->mcontext.pc = entry_point; in __pthread_setup()
84 thread->mcontext.sp = stack_setup (thread, start_routine, arg); in __pthread_setup()
87 if (thread->kernel_thread == ktid) in __pthread_setup()
98 err = __thread_set_pcsptp (thread->kernel_thread, in __pthread_setup()
99 1, thread->mcontext.pc, in __pthread_setup()
100 1, thread->mcontext.sp, in __pthread_setup()
101 1, thread->tcb); in __pthread_setup()
103 tcb = thread->tcb; in __pthread_setup()
107 tcb->self = thread->kernel_thread; in __pthread_setup()