XINU
wakeup.c
Go to the documentation of this file.
1 /* wakeup.c - wakeup */
2 
3 #include <xinu.h>
4 
5 /*------------------------------------------------------------------------
6  * wakeup - Called by clock interrupt handler to awaken processes
7  *------------------------------------------------------------------------
8  */
9 void wakeup(void)
10 {
11  /* Awaken all processes that have no more time to sleep */
12 
14  while (nonempty(sleepq) && (firstkey(sleepq) <= 0)) {
16  }
17 
19  return;
20 }
qid16 sleepq
スリープ中のプロセスキュー
Definition: clkinit.c:7
全てのシステムヘッダファイルをインクルードする。
#define firstkey(q)
リスト中の最初のプロセスのキーを返す。
status ready(pid32)
プロセスをCPUサービスの対象にする。
Definition: ready.c:21
status resched_cntl(int32)
再スケジューリングを延期させるか、もしくは許可させるかを制御する。
Definition: resched.c:81
pid32 dequeue(qid16)
プロセスキューテーブルからキューを削除し、リスト先頭のプロセスIDを返す。
Definition: queue.c:78
#define DEFER_STOP
遅延リスケジューリングの停止
Definition: resched.h:10
#define DEFER_START
遅延リスケジューリングの開始
Definition: resched.h:8
void wakeup(void)
Definition: wakeup.c:9
#define nonempty(q)
リストに中身(プロセス)があるかどうかを返す。
Definition: queue.h:99