This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Update time stamps
#include <sys/iofunc.h> int iofunc_utime( resmgr_context_t* ctp, io_utime_t* msg, iofunc_ocb_t* ocb, iofunc_attr_t* attr );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The iofunc_utime() helper function examines the flags member in the passed attr structure and sets the IOFUNC_ATTR_ATIME and IOFUNC_ATTR_MTIME bits if requested.
The function sets the IOFUNC_ATTR_CTIME and IOFUNC_ATTR_DIRTY_TIME bits. It then calls iofunc_time_update() to update the file times.
The io_utime_t structure holds the _IO_UTIME message received by the resource manager:
struct _io_utime { uint16_t type; uint16_t combine_len; int32_t cur_flag; struct utimbuf times; }; typedef union { struct _io_utime i; } io_utime_t;
The I/O message structures are unions of an input message (coming to the resource manager) and an output or reply message (going back to the client). In this case, there's only an input message, i.
The i member is a structure of type _io_utime that contains the following members:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
iofunc_time_update(), iofunc_utime_default(), utime()
Writing a Resource Manager chapter of the Programmer's Guide.