Уничтожить канал связи
#include <sys/neutrino.h>int ChannelDestroy( int chid );int ChannelDestroy_r( int chid );
libc
These kernel calls remove a channel specified by the channel ID chid argument. Once destroyed, any attempt to receive messages or pulses on the channel will fail. Any threads that are blocked on the channel by calling MsgReceivev() or MsgSendv() will be unblocked and return with an error.
The ChannelDestroy() and ChannelDestroy_r() functions are identical except in the way they indicate errors.
When the channel is destroyed, all server connection IDs become invalid. The client connections are also marked invalid but remain in existence until the client removes them by calling ConnectDetach(). An attempt by the client to use one of these invalid connections using MsgSendv() or MsgSendPulse() will return with an error.
A server typically destroys its channels prior to its termination. If it fails to do so, the kernel destroys them automatically when the process dies.
These calls don't block.
-1
, код ошибки записывается в errno. Любое другое возвращенное значение считается успешным завершением.EOK
возвращается при успешном завершении. Функция НЕ устанавливает errno. При возникновении ошибки функция возвращает один из представленных ниже кодов.
ЗОСРВ «Нейтрино»
ChannelCreate(), MsgReceivev()
Предыдущий раздел: Описание API системной библиотеки