iofunc_ocb_attach()

Инициализировать блок открытого контекста (OCB)

Прототип:

#include <sys/iofunc.h>
int iofunc_ocb_attach( resmgr_context_t *ctp,
io_open_t *msg,
iofunc_ocb_t *ocb,
iofunc_attr_t *attr,
const resmgr_io_funcs_t *io_funcs );

Аргументы:

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_open_t structure that contains the message that the resource manager received.
ocb
NULL, or 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 a iofunc_attr_t structure that defines the characteristics of the device that the resource manager handles.
io_funcs
A pointer to a resmgr_io_funcs_t that specifies the I/O functions for the resource manager.

Библиотека:

libc

Описание:

The iofunc_ocb_attach() function examines the mode specified by the io_open msg, 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.

This function is called by iofunc_open_default() as part of its initialization.

This function allocates the memory for the OCB if you pass NULL as the ocb.

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

EOK
Успешное завершение.

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

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

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

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

io_open_t, iofunc_attr_init(), iofunc_attr_t, iofunc_ocb_detach(), iofunc_ocb_t, iofunc_open_default(), resmgr_context_t, resmgr_io_funcs_t




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