Searched refs:thread (Results 1 - 25 of 454) sorted by relevance

1234567891011>>

/haiku/src/system/kernel/lib/
H A Dkernel_errno.cpp7 #include "thread.h"
13 Kernel space storage for "errno", located in the thread structure
19 Thread *thread = thread_get_current_thread(); local
21 return &thread->kernel_errno;
/haiku/src/system/libroot/posix/pthread/
H A Dpthread_cleanup.cpp13 pthread_thread* thread = pthread_self(); local
14 if (thread == NULL)
17 handler->previous = thread->cleanup_handlers;
18 thread->cleanup_handlers = handler;
25 pthread_thread* thread = pthread_self(); local
26 if (thread == NULL)
29 __pthread_cleanup_handler* handler = thread->cleanup_handlers;
33 thread->cleanup_handlers = handler->previous;
H A Dpthread.cpp42 pthread_thread* thread = (pthread_thread*)_thread; local
46 pthread_exit(thread->entry(thread->entry_argument));
57 pthread_thread* thread = pthread_self(); local
69 __pthread_key_call_destructors(thread);
71 if ((atomic_or(&thread->flags, THREAD_DEAD) & THREAD_DETACHED) != 0)
72 free(thread);
79 pthread_thread* thread = (pthread_thread*)malloc(sizeof(pthread_thread)); local
80 if (thread == NULL)
83 __init_pthread(thread, entr
90 __init_pthread(pthread_thread* thread, void* (*entry)(void*), void* data) argument
104 __pthread_init_creation_attributes(const pthread_attr_t* pthreadAttributes, pthread_t thread, status_t (*entryFunction)(void*, void*), void* argument1, void* argument2, const char* name, thread_creation_attributes* attributes) argument
183 pthread_thread* thread = get_user_thread()->pthread; local
199 pthread_join(pthread_t thread, void** _value) argument
229 pthread_kill(pthread_t thread, int sig) argument
244 pthread_detach(pthread_t thread) argument
281 pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) argument
295 pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param) argument
314 get_pthread_thread_id(pthread_t thread) argument
[all...]
H A Dpthread_cancel.cpp24 /*! Signal handler like function invoked when this thread has been canceled.
31 pthread_t thread = pthread_self(); local
35 if ((atomic_get(&thread->flags) & THREAD_CANCEL_ASYNCHRONOUS) != 0)
44 pthread_cancel(pthread_t thread) argument
47 int32 oldFlags = atomic_or(&thread->flags, THREAD_CANCELED);
53 // If cancellation is enabled, notify the thread. This will call the
56 return _kern_cancel_thread(thread->id, &asynchronous_cancel_thread);
65 pthread_thread* thread = pthread_self(); local
66 if (thread == NULL)
72 oldFlags = atomic_or(&thread
93 pthread_thread* thread = pthread_self(); local
122 pthread_thread* thread = pthread_self(); local
[all...]
/haiku/src/tests/system/kernel/scheduler/
H A Doverride_types.h21 struct thread { struct
22 struct thread *queue_next; /* i.e. run queue, release queue, etc. */
42 THREAD_STATE_FREE_ON_RESCHED = 7, // free the thread structure upon reschedule
43 // THREAD_STATE_BIRTH // thread is being created
47 struct thread *head;
48 struct thread *tail;
53 thread_is_idle_thread(struct thread *thread) argument
55 return thread->is_idle;
58 void thread_enqueue(struct thread *
[all...]
/haiku/src/system/libroot/os/arch/x86_64/
H A Dthread.cpp15 thread_id thread; local
18 __asm__ __volatile__ ("movl %%fs:8, %0" : "=r" (thread));
19 return thread;
/haiku/src/libs/compat/freebsd_network/
H A Dpriv.cpp7 #include <thread.h>
18 priv_check(struct thread *thread, int privilegeLevel) argument
20 // Note: The thread parameter is ignored intentionally (cf. the comment in
22 // thread.
/haiku/src/tools/fs_shell/
H A Dthread.cpp16 fssh_kill_thread(fssh_thread_id thread) argument
18 return kill_thread(thread);
23 fssh_resume_thread(fssh_thread_id thread) argument
25 return resume_thread(thread);
30 fssh_suspend_thread(fssh_thread_id thread) argument
32 return suspend_thread(thread);
/haiku/src/libs/compat/freebsd_network/compat/sys/
H A Dpcpu.h13 struct thread;
15 #define curthread ((struct thread*)NULL)
17 no FreeBSD compatible struct thread and Haiku's should not be used as it
18 is only valid for the current thread or with proper locking. Currently
19 only priv_check() expects a struct thread parameter and ignores it. Using
H A Dpriv.h28 struct thread;
33 int priv_check(struct thread*, int);
/haiku/src/tests/system/kernel/
H A Dyield_test.cpp25 thread_id thread = spawn_thread(looper, "Real-Time Looper", B_REAL_TIME_PRIORITY, NULL); local
26 if (thread < B_OK)
29 resume_thread(thread);
30 wait_for_thread(thread, NULL);
/haiku/src/libs/posix_error_mapper/
H A Dpthread_thread.cpp14 (pthread_t *thread, const pthread_attr_t *attr,
16 return B_TO_POSITIVE_ERROR(sReal_pthread_create(thread, attr, start_routine,
21 WRAPPER_FUNCTION(int, pthread_detach, (pthread_t thread),
22 return B_TO_POSITIVE_ERROR(sReal_pthread_detach(thread));
26 WRAPPER_FUNCTION(int, pthread_join, (pthread_t thread, void **_value),
27 return B_TO_POSITIVE_ERROR(sReal_pthread_join(thread, _value));
31 WRAPPER_FUNCTION(int, pthread_kill, (pthread_t thread, int sig),
32 return B_TO_POSITIVE_ERROR(sReal_pthread_kill(thread, sig));
41 WRAPPER_FUNCTION(int, pthread_cancel, (pthread_t thread),
42 return B_TO_POSITIVE_ERROR(sReal_pthread_cancel(thread));
[all...]
/haiku/src/system/libroot/os/arch/x86/
H A Dthread.c15 // in BeOS R5 OS.h as inline function. Do not change storage of thread id.
17 thread_id thread; local
20 : "=a" (thread));
21 return thread;
39 extern thread_id _kget_thread_stacks_(thread_id thread, uint32 *stacks);
42 _kget_thread_stacks_(thread_id thread, uint32 *stacks) argument
/haiku/src/kits/debugger/debugger_interface/
H A DDebugEvent.cpp15 thread_id thread)
19 fThread(thread),
41 thread_id thread, CpuState* state)
43 DebugEvent(eventType, team, thread),
61 ThreadDebuggedEvent::ThreadDebuggedEvent(team_id team, thread_id thread) argument
63 DebugEvent(B_DEBUGGER_MESSAGE_THREAD_DEBUGGED, team, thread)
71 DebuggerCallEvent::DebuggerCallEvent(team_id team, thread_id thread, argument
74 DebugEvent(B_DEBUGGER_MESSAGE_DEBUGGER_CALL, team, thread),
83 BreakpointHitEvent::BreakpointHitEvent(team_id team, thread_id thread, argument
86 CpuStateEvent(B_DEBUGGER_MESSAGE_BREAKPOINT_HIT, team, thread, stat
14 DebugEvent(int32 eventType, team_id team, thread_id thread) argument
40 CpuStateEvent(debug_debugger_message eventType, team_id team, thread_id thread, CpuState* state) argument
94 WatchpointHitEvent(team_id team, thread_id thread, CpuState* state) argument
106 SingleStepEvent(team_id team, thread_id thread, CpuState* state) argument
117 ExceptionOccurredEvent(team_id team, thread_id thread, debug_exception_type exception) argument
129 TeamDeletedEvent(team_id team, thread_id thread) argument
139 TeamExecEvent(team_id team, thread_id thread) argument
149 ThreadCreatedEvent(team_id team, thread_id thread, thread_id newThread) argument
161 ThreadRenamedEvent(team_id team, thread_id thread, thread_id renamedThread, const char* newName) argument
174 ThreadPriorityChangedEvent(team_id team, thread_id thread, thread_id changedThread, int32 newPriority) argument
187 ThreadDeletedEvent(team_id team, thread_id thread) argument
197 ImageCreatedEvent(team_id team, thread_id thread, const ImageInfo& info) argument
209 ImageDeletedEvent(team_id team, thread_id thread, const ImageInfo& info) argument
221 PostSyscallEvent(team_id team, thread_id thread, const SyscallInfo& info) argument
233 HandedOverEvent(team_id team, thread_id thread, thread_id causingThread) argument
245 SignalReceivedEvent(team_id team, thread_id thread, const SignalInfo& info) argument
[all...]
/haiku/headers/private/kernel/
H A Dthread.h17 #include <arch/thread.h>
18 // For the thread blocking inline functions only.
30 // thread notifications
43 Thread* thread; member in struct:BKernel::ThreadCreationAttributes
47 // used as thread stack
50 arch_fork_arg* forkArgs; // If non-NULL, the userland thread
60 team_id team = -1, Thread* thread = NULL);
82 // called when the thread enters the kernel on behalf of the thread
92 void thread_map(void (*function)(Thread* thread, voi
108 Thread *thread = thread_get_current_thread(); local
113 thread_is_idle_thread(Thread *thread) argument
192 thread_is_interrupted(Thread* thread, uint32 flags) argument
214 thread_is_blocked(Thread* thread) argument
325 thread_prepare_to_block(Thread* thread, uint32 flags, uint32 type, const void* object) argument
351 thread_unblock_locked(Thread* thread, status_t status) argument
386 thread_interrupt(Thread* thread, bool kill) argument
401 thread_pin_to_current_cpu(Thread* thread) argument
408 thread_unpin_from_current_cpu(Thread* thread) argument
417 Thread* thread = thread_get_current_thread(); local
425 Thread* thread = thread_get_current_thread(); local
441 thread_continue(Thread* thread) argument
[all...]
H A Dkscheduler.h25 /*! Enqueues the thread in the ready-to-run queue.
26 The caller must hold the enqueued thread \c scheduler_lock.
28 void scheduler_enqueue_in_run_queue(Thread* thread);
32 /*! Selects a thread from the ready-to-run queue and, if that's not the
33 calling thread, switches the current CPU's context to run the selected
34 thread.
35 If it's the same thread, the thread will just continue to run.
36 In either case, unless the thread is dead or is sleeping/waiting
38 The caller must hold the current thread \
122 Thread* thread = get_cpu_struct()->running_thread; local
[all...]
/haiku/src/system/kernel/
H A Dthread.cpp15 #include <thread.h>
73 // thread list
89 Thread* thread; member in struct:UndertakerEntry
92 UndertakerEntry(Thread* thread, team_id teamID) argument
94 thread(thread),
125 Thread* thread = NULL)
132 event.AddInt32("thread", threadID);
133 if (thread != NULL)
134 event.AddPointer("threadStruct", thread);
139 Notify(uint32 eventCode, Thread* thread) argument
272 Thread* thread = new Thread(name, -1, NULL); local
291 Thread* thread = sThreadHash.Lookup(id); local
303 Thread* thread = sThreadHash.Lookup(id); local
507 Thread* thread = sThreadHash.NextElement(&fEntry); local
518 ThreadCreationAttributes(thread_func function, const char* name, int32 priority, void* arg, team_id team, Thread* thread) argument
599 insert_thread_into_team(Team *team, Thread *thread) argument
618 remove_thread_from_team(Team *team, Thread *thread) argument
638 enter_userspace(Thread* thread, UserThreadEntryArguments* args) argument
679 thread_enter_userspace_new_team(Thread* thread, addr_t entryFunction, void* argument1, void* argument2) argument
700 Thread* thread = thread_get_current_thread(); local
742 init_thread_kernel_stack(Thread* thread, const void* data, size_t dataSize) argument
777 create_thread_user_stack(Team* team, Thread* thread, void* _stackBase, size_t stackSize, size_t additionalSize, size_t guardSize, char* nameBuffer) argument
[all...]
/haiku/src/system/libroot/posix/signal/
H A Dsend_signal.c17 send_signal(thread_id thread, uint sig) argument
19 return _kern_send_signal(thread, sig, NULL, SIGNAL_FLAG_SEND_TO_THREAD);
/haiku/src/apps/debugger/user_interface/cli/commands/
H A DCliStopCommand.cpp20 CliCommand("stop a thread",
21 "%s [ <thread ID> ]\n"
22 "Stops the thread specified by <thread ID>, if supplied. Otherwise "
24 "the current thread.")
40 Thread* thread = NULL; local
42 thread = context.CurrentThread();
43 if (thread == NULL) {
44 printf("Error: No current thread.\n");
56 // get the thread an
[all...]
H A DCliContinueCommand.cpp20 CliCommand("continue the current thread",
22 "Continues the current thread.")
32 Thread* thread = context.CurrentThread(); local
33 if (thread == NULL) {
34 printf("Error: No current thread.\n");
38 if (thread->State() != THREAD_STATE_STOPPED) {
39 printf("Error: The current thread is not stopped.\n");
43 context.GetUserInterfaceListener()->ThreadActionRequested(thread->ID(),
H A DCliThreadsCommand.cpp38 Thread* thread = it.Next();) {
40 thread->State(), thread->StoppedReason());
41 printf("%10" B_PRId32 " %-9s \"%s\"", thread->ID(), stateString,
42 thread->Name());
44 const BString& stoppedReason = thread->StoppedReasonInfo();
45 if (thread->State() == THREAD_STATE_STOPPED
/haiku/headers/private/libroot/
H A Duser_thread.h32 struct user_thread* thread = get_user_thread(); local
33 if (--thread->defer_signals == 0 && thread->pending_signals != 0) {
/haiku/src/system/libroot/posix/unistd/
H A Dsystem.cpp27 thread_id thread = load_image(argc, argv, (const char **)environ); local
28 if (thread < 0)
29 RETURN_AND_SET_ERRNO_TEST_CANCEL(thread);
31 resume_thread(thread);
35 while ((result = waitpid(thread, &exitStatus, 0)) < 0
/haiku/src/system/kernel/arch/arm/
H A Darch_thread.cpp15 #include <thread.h>
19 #include <arch/thread.h>
22 #include <thread.h>
39 // a new thread structure.
81 arch_thread_init_thread_struct(Thread *thread) argument
84 memcpy(&thread->arch_info, &sInitialState, sizeof(struct arch_thread));
91 arch_thread_init_kthread_stack(Thread* thread, void* _stack, void* _stackTop, argument
97 "%p\n", thread->name, stackTop, function, data));
111 thread->arch_info.sp = stackTop;
116 arch_thread_init_tls(Thread *thread) argument
154 arch_thread_enter_userspace(Thread *thread, addr_t entry, void *arg1, void *arg2) argument
163 arch_on_signal_stack(Thread *thread) argument
170 arch_setup_signal_frame(Thread *thread, struct sigaction *sa, struct signal_frame_data *signalFrameData) argument
185 arch_check_syscall_restart(Thread *thread) argument
[all...]
/haiku/src/libs/compat/freebsd_iflib/
H A Dkthread.cpp11 #include <thread.h>
16 struct thread **newtdp, int flags, int pages, const char *fmt, ...)
29 intptr_t thread = id; local
30 *newtdp = (struct thread*)thread;
37 sched_prio(struct thread* td, u_char prio)
45 sched_add(struct thread* td, int /* flags */)

Completed in 155 milliseconds

1234567891011>>