Lines Matching defs:self
1144 thread_t self = current_thread();
1149 thread_lock(self);
1151 prev = self->bound_processor;
1152 self->bound_processor = processor;
1154 thread_unlock(self);
1468 register thread_t self,
1472 thread_continue_t continuation = self->continuation;
1473 void *parameter = self->parameter;
1480 assert(self == current_thread());
1496 if ((self->sched_mode & TH_MODE_REALTIME) && !self->reserved_stack)
1497 self->reserved_stack = self->kernel_stack;
1506 if (self->kernel_stack == self->reserved_stack && !thread->reserved_stack)
1528 self->reason = reason;
1535 self->reason, (int)thread, self->sched_pri, thread->sched_pri, 0);
1538 machine_stack_handoff(self, thread);
1540 thread_dispatch(self, thread);
1553 else if (thread == self) {
1555 ast_context(self);
1557 thread_unlock(self);
1559 self->continuation = self->parameter = NULL;
1561 funnel_refunnel_check(self, 3);
1564 call_continuation(continuation, parameter, self->wait_result);
1581 else if (thread == self) {
1582 ast_context(self);
1584 thread_unlock(self);
1607 assert(self->runq == PROCESSOR_NULL);
1608 self->reason = reason;
1615 (int)self->reason, (int)thread, self->sched_pri, thread->sched_pri, 0);
1622 thread = machine_switch_context(self, continuation, thread);
1623 TLOG(1,"thread_invoke: returning machine_switch_context: self %p continuation %p thread %p\n", self, continuation, thread);
1628 thread_dispatch(thread, self);
1631 self->continuation = self->parameter = NULL;
1633 funnel_refunnel_check(self, 3);
1636 call_continuation(continuation, parameter, self->wait_result);
1656 thread_t self)
1658 processor_t processor = self->last_processor;
1708 self->current_quantum = thread->current_quantum;
1763 if (!(self->state & TH_IDLE)) {
1767 if (self->current_quantum == 0)
1768 thread_quantum_init(self);
1773 processor->quantum_end = (processor->last_dispatch + self->current_quantum);
1774 timer_call_enter1(&processor->quantum_timer, self, processor->quantum_end);
1778 self->last_switch = processor->last_dispatch;
1780 self->computation_epoch = self->last_switch;
1807 register thread_t self = current_thread();
1817 funnel_release_check(self, 2);
1828 self->continuation = continuation;
1829 self->parameter = parameter;
1832 thread_lock(self);
1833 new_thread = thread_select(self, processor);
1834 thread_unlock(self);
1835 } while (!thread_invoke(self, new_thread, reason));
1837 funnel_refunnel_check(self, 5);
1840 return (self->wait_result);
1875 thread_t self,
1882 funnel_release_check(self, 3);
1884 self->continuation = continuation;
1885 self->parameter = parameter;
1887 while (!thread_invoke(self, new_thread, handoff)) {
1890 thread_lock(self);
1891 new_thread = thread_select(self, processor);
1892 thread_unlock(self);
1896 funnel_refunnel_check(self, 6);
1898 return (self->wait_result);
1911 register thread_t self = current_thread();
1915 continuation = self->continuation;
1916 parameter = self->parameter;
1918 thread_dispatch(thread, self);
1920 self->continuation = self->parameter = NULL;
1922 funnel_refunnel_check(self, 4);
1928 call_continuation(continuation, parameter, self->wait_result);