Lines Matching defs:self

1604 	thread_t		self = current_thread();
1609 thread_lock(self);
1611 prev = self->bound_processor;
1612 self->bound_processor = processor;
1614 thread_unlock(self);
2064 register thread_t self,
2068 thread_continue_t continuation = self->continuation;
2069 void *parameter = self->parameter;
2079 assert(self == current_thread());
2098 if ((self->sched_mode == TH_MODE_REALTIME) && !self->reserved_stack)
2099 self->reserved_stack = self->kernel_stack;
2108 if (self->kernel_stack == self->reserved_stack && !thread->reserved_stack)
2131 self->reason = reason;
2134 self->last_run_time = processor->last_dispatch;
2150 self->reason, (uintptr_t)thread_tid(thread), self->sched_pri, thread->sched_pri, 0);
2159 SCHED_STATS_CSW(processor, self->reason, self->sched_pri, thread->sched_pri);
2162 stack_handoff(self, thread);
2166 thread_dispatch(self, thread);
2179 else if (thread == self) {
2181 ast_context(self);
2183 thread_unlock(self);
2187 self->reason, (uintptr_t)thread_tid(thread), self->sched_pri, thread->sched_pri, 0);
2189 self->continuation = self->parameter = NULL;
2191 funnel_refunnel_check(self, 3);
2194 call_continuation(continuation, parameter, self->wait_result);
2211 else if (thread == self) {
2212 ast_context(self);
2214 thread_unlock(self);
2218 self->reason, (uintptr_t)thread_tid(thread), self->sched_pri, thread->sched_pri, 0);
2243 assert(self->runq == PROCESSOR_NULL);
2244 self->reason = reason;
2247 self->last_run_time = processor->last_dispatch;
2264 self->reason, (uintptr_t)thread_tid(thread), self->sched_pri, thread->sched_pri, 0);
2273 SCHED_STATS_CSW(processor, self->reason, self->sched_pri, thread->sched_pri);
2280 assert(continuation == self->continuation);
2281 thread = machine_switch_context(self, continuation, thread);
2282 assert(self == current_thread());
2283 TLOG(1,"thread_invoke: returning machine_switch_context: self %p continuation %p thread %p\n", self, continuation, thread);
2290 thread_dispatch(thread, self);
2293 self->continuation = self->parameter = NULL;
2295 funnel_refunnel_check(self, 3);
2298 call_continuation(continuation, parameter, self->wait_result);
2318 thread_t self)
2320 processor_t processor = self->last_processor;
2390 self->current_quantum = thread->current_quantum;
2462 if (!(self->state & TH_IDLE)) {
2464 if (self->sched_mode == TH_MODE_REALTIME)
2465 thread_tell_urgency(THREAD_URGENCY_REAL_TIME, self->realtime.period, self->realtime.deadline);
2469 else if ((self->sched_pri <= MAXPRI_THROTTLE) &&
2470 (self->priority <= MAXPRI_THROTTLE))
2471 thread_tell_urgency(THREAD_URGENCY_BACKGROUND, self->sched_pri, self->priority);
2473 thread_tell_urgency(THREAD_URGENCY_NORMAL, self->sched_pri, self->priority);
2477 if (self->current_quantum == 0) {
2478 thread_quantum_init(self);
2479 self->last_quantum_refill_time = processor->last_dispatch;
2485 processor->quantum_end = (processor->last_dispatch + self->current_quantum);
2486 timer_call_enter1(&processor->quantum_timer, self, processor->quantum_end, TIMER_CALL_CRITICAL);
2490 self->computation_epoch = processor->last_dispatch;
2524 register thread_t self = current_thread();
2534 funnel_release_check(self, 2);
2545 self->continuation = continuation;
2546 self->parameter = parameter;
2548 if (__improbable(kdebug_thread_block && kdebug_enable && self->state != TH_RUN)) {
2555 thread_lock(self);
2556 new_thread = thread_select(self, processor);
2557 thread_unlock(self);
2558 } while (!thread_invoke(self, new_thread, reason));
2560 funnel_refunnel_check(self, 5);
2563 return (self->wait_result);
2598 thread_t self,
2605 funnel_release_check(self, 3);
2607 self->continuation = continuation;
2608 self->parameter = parameter;
2610 while (!thread_invoke(self, new_thread, handoff)) {
2613 thread_lock(self);
2614 new_thread = thread_select(self, processor);
2615 thread_unlock(self);
2619 funnel_refunnel_check(self, 6);
2621 return (self->wait_result);
2634 register thread_t self = current_thread();
2640 continuation = self->continuation;
2641 parameter = self->parameter;
2643 thread_dispatch(thread, self);
2645 self->continuation = self->parameter = NULL;
2647 funnel_refunnel_check(self, 4);
2653 call_continuation(continuation, parameter, self->wait_result);