[Previous] [Contents] [Next]

iofunc_openfd()

Increment count and locking flags

Synopsis:

#include <sys/iofunc.h>

int iofunc_openfd( resmgr_context_t *ctp,
                   io_openfd_t *msg,
                   iofunc_ocb_t *ocb,
                   iofunc_attr_t *attr );

Library:

libc

Description:

The function iofunc_openfd() examines the mode specified by the _IO_OPENFD 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.

If ocb is NULL, the function allocates memory for the OCB.

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

Returns:

EOK
Success.
EACCES
You don't have permission to open the file.
EBUSY
The file has shared locks that are in use.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

iofunc_ocb_attach(), iofunc_openfd_default(), openfd()


[Previous] [Contents] [Next]