XINU
semaphore.h
Go to the documentation of this file.
1 
5 #ifndef NSEM
6 #define NSEM 120
8 #endif
9 
11 #define S_FREE 0
12 #define S_USED 1
14 
19 struct sentry
20 {
27 };
28 
30 extern struct sentry semtab[];
31 
40 #define isbadsem(s) ((int32)(s) < 0 || (s) >= NSEM)
unsigned char byte
符号なし8ビット値(unsigned char)
Definition: kernel.h:7
byte sstate
エントリ状態が利用可能(S_FREE)か、利用中(S_USED)かを表す。
Definition: semaphore.h:22
セマフォテーブルエントリであり、本構造体の配列(長さNSEM)が静的に確保される。
Definition: semaphore.h:19
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
int16 qid16
キューID
Definition: kernel.h:24
qid16 squeue
セマフォ待機中プロセスのキュー
Definition: semaphore.h:26
int32 scount
セマフォカウント(負の値(-N)の場合は、キューにN個の待機プロセスがある。それ以外はキューが空である) ...
Definition: semaphore.h:24
struct sentry semtab[]
セマフォテーブルエントリのextern宣言
Definition: initialize.c:25