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_utime.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_utime.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_utime.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_utime.html on line 8

iofunc_utime()

Update time stamps

Synopsis:

#include <sys/iofunc.h>

int iofunc_utime( resmgr_context_t* ctp,
                  io_utime_t* msg,
                  iofunc_ocb_t* ocb,
                  iofunc_attr_t* attr );

Arguments:

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_utime_t structure that contains the message that the resource manager received; see below.
ocb
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 the iofunc_attr_t structure that describes the characteristics of the device that's associated with your resource manager.

Library:

libc

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

Description:

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.

io_utime_t structure

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:

type
_IO_UTIME.
combine_len
If the message is a combine message, _IO_COMBINE_FLAG is set in this member. For more information, see Combine Messages chapter of Writing a Resource Manager.
cur_flag
If set, iofunc_utime() ignores the times member, and set the appropriate file times to the current time.
times
A utimbuf structure that specifies the time to use when setting the file times. For more information about this structure, see utime().

Returns:

EACCES
The client doesn't have permissions to do the operation.
EFAULT
A fault occurred when the kernel tried to access the info buffer.
EINVAL
The client process is no longer valid.
ENOSYS
NULL was passed in info.
EOK
Successful completion.
EPERM
The group ID or owner ID didn't match.
EROFS
Attempt to remove an entry on a read-only filesystem.

Classification:

QNX Neutrino

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

See also:

iofunc_time_update(), iofunc_utime_default(), utime()

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_utime.html on line 237

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_utime.html on line 237