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

Lines Matching defs:thread

847  *		Insert the current thread into the supplied wait queue
852 * The waiting thread is assumed locked.
861 thread_t thread)
865 if (!wait_queue_assert_possible(thread))
877 * into account. If the thread is vm priviledged, we stick it at
881 wait_result = thread_mark_wait_locked(thread, interruptible);
883 if (thread->options & TH_OPT_VMPRIV)
884 enqueue_head(&wq->wq_queue, (queue_entry_t) thread);
886 enqueue_tail(&wq->wq_queue, (queue_entry_t) thread);
888 thread->wait_event = event;
889 thread->wait_queue = wq;
892 if (!timer_call_enter(&thread->wait_timer, deadline))
893 thread->wait_timer_active++;
894 thread->wait_timer_is_set = TRUE;
903 * Insert the current thread into the supplied wait queue
918 thread_t thread = current_thread();
922 return (thread->wait_result = THREAD_RESTART);
926 thread_lock(thread);
928 interruptible, deadline, thread);
929 thread_unlock(thread);
938 * Insert the current thread into the supplied wait queue
952 thread_t thread = current_thread();
956 return (thread->wait_result = THREAD_RESTART);
960 thread_lock(thread);
961 ret = wait_queue_assert_wait64_locked(wq, event, interruptible, deadline, thread);
962 thread_unlock(thread);
1026 * Otherwise, its a thread. If it is waiting on
1085 * For each thread, set it running.
1089 thread_t thread = (thread_t) dequeue(q);
1090 res = thread_go(thread, result);
1092 thread_unlock(thread);
1170 * Select the best thread off a wait queue that meet the
1177 * a locked thread - if one found
1223 * Otherwise, its a thread. If it is waiting on
1248 * Pull a thread off its wait queue and (possibly) unlock
1253 * thread locked
1255 * with the thread still locked.
1260 thread_t thread,
1264 assert(thread->wait_queue == waitq);
1266 remqueue(&waitq->wq_queue, (queue_entry_t)thread );
1267 thread->wait_queue = WAIT_QUEUE_NULL;
1268 thread->wait_event = NO_EVENT64;
1269 thread->at_safe_point = FALSE;
1278 * Look for a thread and remove it from the queues, if
1279 * (and only if) the thread is waiting on the supplied
1293 thread_t thread)
1300 thread_lock(thread);
1301 if ((thread->wait_queue == wq) && (thread->wait_event == event)) {
1302 remqueue(q, (queue_entry_t) thread);
1303 thread->at_safe_point = FALSE;
1304 thread->wait_event = NO_EVENT64;
1305 thread->wait_queue = WAIT_QUEUE_NULL;
1306 /* thread still locked */
1309 thread_unlock(thread);
1312 * The wait_queue associated with the thread may be one of this
1331 thread);
1346 * Select a single thread that is most-eligible to run and set
1347 * set it running. But return the thread locked.
1354 * a pointer to the locked thread that was awakened
1364 thread_t thread;
1368 thread = _wait_queue_select64_one(wq, event);
1372 if (thread) {
1373 res = thread_go(thread, result);
1376 return thread; /* still locked if not NULL */
1383 * Select a single thread that is most-eligible to run and set
1392 * KERN_NOT_WAITING - No thread was waiting <wq,event> pair
1401 thread_t thread;
1405 thread = _wait_queue_select64_one(wq, event);
1409 if (thread) {
1412 res = thread_go(thread, result);
1414 thread_unlock(thread);
1424 * Wakeup the most appropriate thread that is in the specified
1430 * KERN_NOT_WAITING - No thread was waiting <wq,event> pair
1438 thread_t thread;
1447 thread = _wait_queue_select64_one(wq, (event64_t)((uint32_t)event));
1450 if (thread) {
1453 res = thread_go(thread, result);
1455 thread_unlock(thread);
1467 * Wakeup the most appropriate thread that is in the specified
1473 * KERN_NOT_WAITING - No thread was waiting <wq,event> pair
1481 thread_t thread;
1489 thread = _wait_queue_select64_one(wq, event);
1492 if (thread) {
1495 res = thread_go(thread, result);
1497 thread_unlock(thread);
1510 * Wakeup the particular thread that was specified if and only
1514 * This is much safer than just removing the thread from
1523 * KERN_SUCCESS - the thread was found waiting and awakened
1524 * KERN_NOT_WAITING - the thread was not waiting here
1530 thread_t thread,
1539 * See if the thread was still waiting there. If so, it got
1542 res = _wait_queue_select64_thread(wq, event, thread);
1549 res = thread_go(thread, result);
1551 thread_unlock(thread);
1558 * Wakeup the particular thread that was specified if and only
1562 * This is much safer than just removing the thread from
1571 * KERN_SUCCESS - the thread was found waiting and awakened
1572 * KERN_NOT_WAITING - the thread was not waiting here
1578 thread_t thread,
1590 res = _wait_queue_select64_thread(wq, (event64_t)((uint32_t)event), thread);
1594 res = thread_go(thread, result);
1596 thread_unlock(thread);
1607 * Wakeup the particular thread that was specified if and only
1611 * This is much safer than just removing the thread from
1620 * KERN_SUCCESS - the thread was found waiting and awakened
1621 * KERN_NOT_WAITING - the thread was not waiting here
1627 thread_t thread,
1639 res = _wait_queue_select64_thread(wq, event, thread);
1643 res = thread_go(thread, result);
1645 thread_unlock(thread);