Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 8

iofunc_fdinfo()

Handle an _IO_FDINFO message

Synopsis:

#include <sys/iofunc.h>

int iofunc_fdinfo( resmgr_context_t * ctp, 
                   iofunc_ocb_t * ocb,
                   iofunc_attr_t * attr,
                   struct _fdinfo * info );

Arguments:

ctp
A pointer to a resmgr_context_t structure that the resource-manager library uses to pass context information between functions.
ocb
A pointer to the iofunc_ocb_t structure for the Open Control Block that was created when the client opened the resource.
attr
NULL, or a pointer to the iofunc_attr_t structure that describes the characteristics of the device that's associated with your resource manager.
info
A pointer to a _fdinfo structure that the function fills with the information. This structure is defined in <sys/iomgr.h> as:
struct _fdinfo {
    uint32_t     mode;   /* File mode */
    uint32_t     ioflag; /* Current io flags */
    uint64_t     offset; /* Current seek position */
    uint64_t     size;   /* Current size of file */
    uint32_t     flags;  /* _FDINFO_* */
    uint16_t     sflag;  /* Share flags */
    uint16_t     count;  /* File use count */
    uint16_t     rcount; /* File reader count */
    uint16_t     wcount; /* File writer count */
    uint16_t     rlocks; /* Number of read locks */
    uint16_t     wlocks; /* Number of write locks */
    uint32_t     zero[6];
};
  

The _fdinfo structure is included in the reply part of a io_fdinfo_t structure; for more information, see the documentation for iofunc_fdinfo_default().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The iofunc_fdinfo() helper function provides the implementation for the client's iofdinfo() call, which is received as an _IO_FDINFO message by the resource manager.

The iofunc_fdinfo() function transfers the appropriate fields from the ocb and attr structures to the info structure. If attr is NULL, then the attr information comes from the structure pointed to by ocb->attr.

Returns:

EOK
Successful completion.

Classification:

QNX Neutrino

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

See also:

iofdinfo(), iofunc_attr_t, iofunc_fdinfo_default(), iofunc_ocb_t, resmgr_context_t, resmgr_pathname()

Writing a Resource Manager

Resource Managers chapter of Getting Started with QNX Neutrino


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 183

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_fdinfo.html on line 183