iofunc_openfd()

Инкрементировать счетчик и флаги блокировки

Прототип:

#include <sys/iofunc.h>
int iofunc_openfd( resmgr_context_t *ctp,
io_openfd_t *msg,
iofunc_ocb_t *ocb,
iofunc_attr_t *attr );

Аргументы:

ctp
A pointer to a resmgr_context_t structure that the resource-manager library uses to pass context information between functions.
msg
A pointer to the io_openfd_t structure that contains the message that the resource manager received.
ocb
A pointer to the iofunc_ocb_t structure for the Open Control Block that was created when the client opened the resource.
attr
A pointer to the iofunc_attr_t structure that describes the characteristics of the device that's associated with your resource manager.

Библиотека:

libc

Описание:

The iofunc_openfd() helper function examines the mode specified by the _IO_OPENFD message, and increments the read and write count flags (ocb->attr->rcount and ocb->attr->wcount), and the locking flags (ocb->attr->rlocks and ocb->attr->wlocks), as specified by the open mode.

The function does what's needed to support the openfd() function.

Возвращаемое значение:

EOK
Успешное завершение.
EACCES
You don't have permission to open the file.
EBUSY
The file has shared locks that are in use.

Классификация:

ЗОСРВ «Нейтрино»

Точка остановки потока
Нет
Обработчик прерываний
Нет
Обработчик сигналов
Да
В потоке
Да

Тематические ссылки:

io_openfd_t, iofunc_ocb_attach(), iofunc_openfd_default(), struct _msg_info, openfd(), resmgr_context_t




Предыдущий раздел: Описание API системной библиотеки