XINU
|
ポートを削除し、待機中のプロセスとメッセージを解放する。 More...
#include <xinu.h>
Go to the source code of this file.
Functions | |
syscall | ptdelete (int32 portid, int32(*disp)(int32)) |
ポートを削除し、待機中のプロセスとメッセージを解放する。 More... | |
ポートを削除し、待機中のプロセスとメッセージを解放する。
Definition in file ptdelete.c.
ポートを削除し、待機中のプロセスとメッセージを解放する。
Step1. 割り込みを禁止する。
Step2. ポートIDが不正、もしくはポートがALLOC状態でなければ割り込み状態を復元し、処理を終了する。
Step3. ポートを用いたメッセージと待機中プロセスを解放し、セマフォを削除する。
Step4. 次回のポート作成時には、今回削除したポートIDを使用するように設定する。
Step5. 割り込み状態を復元する。
[in] | portid | 削除対象のポート |
[in] | disp | 待機メッセージ処分用の関数ポインタ |
Definition at line 19 of file ptdelete.c.
References _ptclear(), disable(), isbadport, OK, porttab, PT_ALLOC, PT_FREE, ptnextid, ptentry::ptstate, restore(), and SYSERR.