curthread 59 sys/include/kernel.h extern struct thread *curthread; /* pointer to the current thread */ curthread 64 sys/include/task.h #define curtask (curthread->task) curthread 105 sys/ipc/msg.c if (obj == curthread->recvobj) { curthread 119 sys/ipc/msg.c curthread->msgaddr = kmsg; curthread 120 sys/ipc/msg.c curthread->msgsize = size; curthread 143 sys/ipc/msg.c curthread->sendobj = obj; curthread 144 sys/ipc/msg.c msg_enqueue(&obj->sendq, curthread); curthread 147 sys/ipc/msg.c queue_remove(&curthread->ipc_link); curthread 148 sys/ipc/msg.c curthread->sendobj = NULL; curthread 212 sys/ipc/msg.c if (curthread->recvobj) { curthread 216 sys/ipc/msg.c curthread->recvobj = obj; curthread 225 sys/ipc/msg.c msg_enqueue(&obj->recvq, curthread); curthread 236 sys/ipc/msg.c queue_remove(&curthread->ipc_link); curthread 243 sys/ipc/msg.c curthread->recvobj = NULL; curthread 266 sys/ipc/msg.c curthread->recvobj = NULL; curthread 274 sys/ipc/msg.c curthread->sender = t; curthread 275 sys/ipc/msg.c t->receiver = curthread; curthread 298 sys/ipc/msg.c if (!object_valid(obj) || obj != curthread->recvobj) { curthread 305 sys/ipc/msg.c if (curthread->sender == NULL) { curthread 307 sys/ipc/msg.c curthread->recvobj = NULL; curthread 314 sys/ipc/msg.c t = curthread->sender; curthread 329 sys/ipc/msg.c curthread->sender = NULL; curthread 330 sys/ipc/msg.c curthread->recvobj = NULL; curthread 185 sys/kern/debug.c context_dump(&curthread->ctx); curthread 265 sys/kern/exception.c if (curthread->excbits & (1 << i)) curthread 294 sys/kern/exception.c curthread->excbits |= (1 << excno); curthread 316 sys/kern/exception.c ASSERT(curthread->state != TS_EXIT); curthread 320 sys/kern/exception.c bitmap = curthread->excbits; curthread 346 sys/kern/exception.c context_save(&curthread->ctx); curthread 347 sys/kern/exception.c context_set(&curthread->ctx, CTX_UENTRY, (register_t)handler); curthread 348 sys/kern/exception.c context_set(&curthread->ctx, CTX_UARG, (register_t)excno); curthread 349 sys/kern/exception.c curthread->excbits &= ~(1 << excno); curthread 365 sys/kern/exception.c context_restore(&curthread->ctx); curthread 124 sys/kern/sched.c curthread->resched = 1; curthread 187 sys/kern/sched.c if (t != curthread && t->state == TS_RUN) curthread 222 sys/kern/sched.c prev = curthread; curthread 238 sys/kern/sched.c curthread = next; curthread 280 sys/kern/sched.c curthread->slpevt = evt; curthread 281 sys/kern/sched.c curthread->state |= TS_SLEEP; curthread 282 sys/kern/sched.c enqueue(&evt->sleepq, &curthread->sched_link); curthread 288 sys/kern/sched.c timer_callout(&curthread->timeout, msec, curthread 289 sys/kern/sched.c &sleep_timeout, curthread); curthread 297 sys/kern/sched.c return curthread->slpret; curthread 401 sys/kern/sched.c if (!queue_empty(&runq[curthread->priority])) curthread 402 sys/kern/sched.c curthread->resched = 1; curthread 416 sys/kern/sched.c if (t == curthread) curthread 417 sys/kern/sched.c curthread->resched = 1; curthread 448 sys/kern/sched.c if (curthread->state != TS_EXIT) { curthread 452 sys/kern/sched.c curthread->time++; curthread 454 sys/kern/sched.c if (curthread->policy == SCHED_RR) { curthread 455 sys/kern/sched.c if (--curthread->timeleft <= 0) { curthread 460 sys/kern/sched.c curthread->timeleft += QUANTUM; curthread 461 sys/kern/sched.c curthread->resched = 1; curthread 489 sys/kern/sched.c if (t == curthread) { curthread 496 sys/kern/sched.c curthread->locks = 1; curthread 497 sys/kern/sched.c curthread->resched = 1; curthread 520 sys/kern/sched.c curthread->locks++; curthread 536 sys/kern/sched.c ASSERT(curthread->locks > 0); curthread 539 sys/kern/sched.c if (curthread->locks == 1) { curthread 541 sys/kern/sched.c while (curthread->resched) { curthread 559 sys/kern/sched.c curthread->locks--; curthread 586 sys/kern/sched.c if (t == curthread) { curthread 594 sys/kern/sched.c curthread->resched = 1; curthread 726 sys/kern/sched.c curthread->resched = 1; curthread 216 sys/kern/system.c printf(" task=%s thread=%lx\n", curtask->name, (long)curthread); curthread 199 sys/kern/task.c if (t != curthread) curthread 203 sys/kern/task.c thread_destroy(curthread); curthread 220 sys/kern/task.c return curthread->task; curthread 52 sys/kern/thread.c thread_t curthread = &idle_thread; /* current thread */ curthread 104 sys/kern/thread.c memcpy(t->kstack, curthread->kstack, KSTACKSZ); curthread 108 sys/kern/thread.c sched_start(t, curthread->basepri, SCHED_RR); curthread 204 sys/kern/thread.c return curthread; curthread 272 sys/kern/thread.c ASSERT(t != curthread); curthread 457 sys/kern/thread.c ASSERT(zombie != curthread); curthread 463 sys/kern/thread.c if (t == curthread) { curthread 502 sys/kern/thread.c info->active = (t == curthread) ? 1 : 0; curthread 530 sys/kern/thread.c ASSERT(curthread->locks > 0); curthread 155 sys/kern/timer.c tmr = &curthread->timeout; curthread 311 sys/kern/timer.c tmr = curthread->periodic; curthread 400 sys/kern/timer.c if (curthread->priority == PRI_IDLE) curthread 198 sys/sync/mutex.c if (m->holder == curthread) { curthread 211 sys/sync/mutex.c m->priority = curthread->priority; curthread 216 sys/sync/mutex.c curthread->mutex_waiting = m; curthread 217 sys/sync/mutex.c if ((error = prio_inherit(curthread)) != 0) { curthread 218 sys/sync/mutex.c curthread->mutex_waiting = NULL; curthread 223 sys/sync/mutex.c curthread->mutex_waiting = NULL; curthread 230 sys/sync/mutex.c m->holder = curthread; curthread 231 sys/sync/mutex.c list_insert(&curthread->mutexes, &m->link); curthread 252 sys/sync/mutex.c if (m->holder == curthread) { curthread 260 sys/sync/mutex.c m->holder = curthread; curthread 261 sys/sync/mutex.c list_insert(&curthread->mutexes, &m->link); curthread 284 sys/sync/mutex.c if (m->holder != curthread || m->locks <= 0) { curthread 290 sys/sync/mutex.c prio_uninherit(curthread);