XINU
Functions
wakeup.c File Reference
#include <xinu.h>
Include dependency graph for wakeup.c:

Go to the source code of this file.

Functions

void wakeup (void)
 

Function Documentation

◆ wakeup()

void wakeup ( void  )

Definition at line 9 of file wakeup.c.

References DEFER_START, DEFER_STOP, dequeue(), firstkey, nonempty, ready(), resched_cntl(), and sleepq.

Referenced by clkhandler().

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
#define nonempty(q)
リストに中身(プロセス)があるかどうかを返す。
Definition: queue.h:99
Here is the call graph for this function:
Here is the caller graph for this function: