Handle an _IO_FDINFO message
#include <sys/iofunc.h> int iofunc_fdinfo( resmgr_context_t * ctp, iofunc_ocb_t * ocb, iofunc_attr_t * attr, struct _fdinfo * info );
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().
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
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.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |