Lines Matching refs:thread

10 #include <arch/thread.h>
23 #include <thread.h>
87 Thread* thread = thread_get_current_thread();
89 atomic_and(&thread->flags, ~THREAD_FLAGS_RESTART_SYSCALL);
90 atomic_or(&thread->flags, THREAD_FLAGS_SYSCALL_RESTARTED);
103 x86_set_tls_context(Thread *thread)
107 thread->user_local_storage);
125 get_signal_stack(Thread* thread, struct iframe* frame, struct sigaction* action,
129 if (thread->signal_stack_enabled
131 && (frame->user_sp < thread->signal_stack_base
132 || frame->user_sp >= thread->signal_stack_base
133 + thread->signal_stack_size)) {
134 addr_t stackTop = thread->signal_stack_base + thread->signal_stack_size;
150 // part of each new thread
163 arch_thread_init_thread_struct(Thread *thread)
166 memcpy(&thread->arch_info, &sInitialState, sizeof(struct arch_thread));
171 /*! Prepares the given thread's kernel stack for executing its entry function.
173 \param thread The thread.
174 \param stack The usable bottom of the thread's kernel stack.
175 \param stackTop The usable top of the thread's kernel stack.
176 \param function The entry function the thread shall execute.
180 arch_thread_init_kthread_stack(Thread* thread, void* _stack, void* _stackTop,
203 thread->arch_info.current_stack.esp = stackTop;
204 thread->arch_info.current_stack.ss = (addr_t*)KERNEL_DATA_SELECTOR;
219 /*! Sets up initial thread context and enters user space
222 arch_thread_enter_userspace(Thread* thread, addr_t entry, void* args1,
225 addr_t stackTop = thread->user_stack_base + thread->user_stack_size;
233 // Copy the address of the stub that calls exit_thread() when the thread
236 addr_t commPageAddress = (addr_t)thread->team->commpage_address;
259 x86_initial_return_to_userland(thread, &frame);
269 copies it to the thread's userland stack (the one on which the signal shall
278 - \c context.uc_stack: The stack currently used by the thread.
283 Furthermore the function needs to set \c thread->user_signal_context to the
286 \param thread The current thread.
293 arch_setup_signal_frame(Thread* thread, struct sigaction* action,
332 uint8* userStack = get_signal_stack(thread, frame, action,
354 thread->user_signal_context = &userSignalFrameData->context;
356 // Adjust the iframe's esp and eip, so that the thread will continue with
361 thread->team->commpage_address);
402 Thread* thread = thread_get_current_thread();
403 atomic_or(&thread->flags, THREAD_FLAGS_64_BIT_SYSCALL_RETURN);