• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/kern/

Lines Matching defs:thread

70 #include <kern/thread.h>
83 * This boolean can be used by a thread waiting on a
84 * lock or condition: If FALSE is returned, the thread is justified
87 * returned, the thread should make one more check on the
199 * Context switch. User may supply thread hint.
205 register thread_t thread, self = current_thread();
235 thread = convert_port_to_thread(port);
238 if (thread == self) {
239 (void)thread_deallocate_internal(thread);
240 thread = THREAD_NULL;
244 thread = THREAD_NULL;
247 thread = THREAD_NULL;
252 if (thread != THREAD_NULL) {
257 thread_lock(thread);
260 * Check that the thread is not bound
269 thread->sched_pri < BASEPRI_RTQUEUES &&
270 (thread->bound_processor == PROCESSOR_NULL ||
271 thread->bound_processor == processor) &&
272 run_queue_remove(thread) ) {
276 thread_unlock(thread);
278 (void)thread_deallocate_internal(thread);
289 thread_run(self, (thread_continue_t)thread_switch_continue, NULL, thread);
293 thread_unlock(thread);
296 thread_deallocate(thread);
316 * Depress thread's priority to lowest possible for the specified interval,
365 thread_t thread = p0;
369 thread_lock(thread);
370 if (--thread->depress_timer_active == 0) {
371 thread->sched_mode &= ~TH_MODE_ISDEPRESSED;
372 compute_priority(thread, FALSE);
374 thread_unlock(thread);
383 thread_t thread)
389 thread_lock(thread);
390 if (!(thread->sched_mode & TH_MODE_POLLDEPRESS)) {
391 if (thread->sched_mode & TH_MODE_ISDEPRESSED) {
392 thread->sched_mode &= ~TH_MODE_ISDEPRESSED;
393 compute_priority(thread, FALSE);
397 if (timer_call_cancel(&thread->depress_timer))
398 thread->depress_timer_active--;
400 thread_unlock(thread);