/haiku/src/system/kernel/lib/ |
H A D | kernel_errno.cpp | 7 #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 D | pthread_cleanup.cpp | 13 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 D | pthread.cpp | 42 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 299 pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param) argument 322 get_pthread_thread_id(pthread_t thread) argument 329 __pthread_getname_np(pthread_t thread, char* buffer, size_t length) argument 342 __pthread_setname_np(pthread_t thread, const char* name) argument [all...] |
H A D | pthread_cancel.cpp | 24 /*! 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 D | override_types.h | 21 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 D | thread.cpp | 15 thread_id thread; local 18 __asm__ __volatile__ ("movl %%fs:8, %0" : "=r" (thread)); 19 return thread;
|
/haiku/src/tools/fs_shell/ |
H A D | thread.cpp | 16 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 D | pcpu.h | 13 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 D | priv.h | 28 struct thread; 33 int priv_check(struct thread*, int);
|
/haiku/src/libs/compat/freebsd_network/ |
H A D | priv.cpp | 16 priv_check(struct thread *thread, int privilegeLevel) argument 18 // Note: The thread parameter is ignored intentionally (cf. the comment in 20 // thread.
|
/haiku/src/tests/system/kernel/ |
H A D | yield_test.cpp | 25 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 D | pthread_thread.cpp | 14 (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 D | thread.c | 15 // 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/headers/private/kernel/util/ |
H A D | ThreadAutoLock.h | 11 #include <thread.h> 19 inline bool Lock(Thread* thread) argument 21 thread_pin_to_current_cpu(thread); 25 inline void Unlock(Thread* thread) argument 27 thread_unpin_from_current_cpu(thread);
|
/haiku/src/kits/debugger/debugger_interface/ |
H A D | DebugEvent.cpp | 15 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 D | thread.h | 17 #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 193 thread_is_interrupted(Thread* thread, uint32 flags) argument 215 thread_is_blocked(Thread* thread) argument 326 thread_prepare_to_block(Thread* thread, uint32 flags, uint32 type, const void* object) argument 352 thread_unblock_locked(Thread* thread, status_t status) argument 387 thread_interrupt(Thread* thread, bool kill) argument 402 thread_pin_to_current_cpu(Thread* thread) argument 409 thread_unpin_from_current_cpu(Thread* thread) argument 418 Thread* thread = thread_get_current_thread(); local 426 Thread* thread = thread_get_current_thread(); local 442 thread_continue(Thread* thread) argument [all...] |
H A D | kscheduler.h | 25 /*! 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 \ 123 Thread* thread = get_cpu_struct()->running_thread; local [all...] |
/haiku/src/system/kernel/ |
H A D | thread.cpp | 15 #include <thread.h> 74 // thread list 90 Thread* thread; member in struct:UndertakerEntry 93 UndertakerEntry(Thread* thread, team_id teamID) argument 95 thread(thread), 126 Thread* thread = NULL) 133 event.AddInt32("thread", threadID); 134 if (thread != NULL) 135 event.AddPointer("threadStruct", thread); 140 Notify(uint32 eventCode, Thread* thread) argument 273 Thread* thread = new Thread(name, -1, NULL); local 292 Thread* thread = sThreadHash.Lookup(id); local 304 Thread* thread = sThreadHash.Lookup(id); local 508 Thread* thread = sThreadHash.NextElement(&fEntry); local 519 ThreadCreationAttributes(thread_func function, const char* name, int32 priority, void* arg, team_id team, Thread* thread) argument 600 insert_thread_into_team(Team *team, Thread *thread) argument 619 remove_thread_from_team(Team *team, Thread *thread) argument 639 enter_userspace(Thread* thread, UserThreadEntryArguments* args) argument 699 thread_enter_userspace_new_team(Thread* thread, addr_t entryFunction, void* argument1, void* argument2) argument 720 Thread* thread = thread_get_current_thread(); local 762 init_thread_kernel_stack(Thread* thread, const void* data, size_t dataSize) argument 797 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 D | send_signal.c | 17 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 D | CliStopCommand.cpp | 20 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 D | CliContinueCommand.cpp | 20 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 D | CliThreadsCommand.cpp | 38 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 D | user_thread.h | 32 struct user_thread* thread = get_user_thread(); local 33 if (--thread->defer_signals == 0 && thread->pending_signals != 0) {
|
/haiku/headers/compatibility/gnu/ |
H A D | pthread.h | 20 extern int pthread_getattr_np(pthread_t thread, pthread_attr_t* attr); 22 extern int pthread_getname_np(pthread_t thread, char* buffer, size_t length); 23 extern int pthread_setname_np(pthread_t thread, const char* name);
|
/haiku/src/libs/compat/freebsd_iflib/ |
H A D | kthread.cpp | 11 #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 */)
|