XINU
|
セマフォのカウント値を返す。 More...
#include <xinu.h>
Go to the source code of this file.
Functions | |
syscall | semcount (sid32 semid) |
セマフォのカウント値を返す。 More... | |
セマフォのカウント値を返す。
Definition in file semcount.c.
セマフォのカウント値を返す。
Step1. 割り込みを禁止する。
Step2. 「セマフォIDが不正値」か「セマフォがFREE状態」の場合、割り込み許可状態に復元して、処理を終了する。
Step3. 引数で渡されたセマフォIDを基に、セマフォテーブルからセマフォのカウント値を取得する。
Step4. 割り込み許可状態に復元する。
[in] | semid | セマフォカウンタを確認したいセマフォのID |
Definition at line 18 of file semcount.c.
References disable(), isbadsem, restore(), S_FREE, sentry::scount, semtab, and SYSERR.
Referenced by ethhandler(), ip_enqueue(), ptcount(), rdswrite(), ttycontrol(), ttyhandle_in(), ttyhandle_out(), and ttyread().