iofunc_attr_init(), iofunc_attr_init_sized()

Initialize the per-name attribute structure associated with a device


#include <sys/iofunc.h>

void iofunc_attr_init_sized ( iofunc_attr_t *attr,
                              mode_t mode,
                              iofunc_attr_t *dattr,
                              struct _client_info *info,
                              size_t size );

#define iofunc_attr_init(attr, mode, dattr, info) ...


A pointer to the iofunc_attr_t structure that you want to initialize.
The type and access permissions that you want to use for the resource. For more information, see the entry for struct stat.

In general, there isn't a “correct” set of permissions to use; you should restrict them according to what you want other processes and users to be able to do with your resource manager.

NULL, or a pointer to a iofunc_attr_t structure that you want to use to initialize the structure pointed to by attr.
NULL, or a pointer to a _client_info structure that contains the information about a client connection. For information about this structure, see ConnectClientInfo().
(iofunc_attr_init_sized() only) The size of the attributes structure; for iofunc_attr_init(), this is sizeof(iofunc_attr_t).



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


The iofunc_attr_init() and iofunc_attr_init_sized() functions initialize the per-name attributes that a resource manager associates with a device.

These functions initialize the iofunc_attr_t structure pointed to by attr with the information derived from the optional dattr, the mode, and the user and group IDs from the optional info client information structure.

The count, rcount, wcount, rlocks and wlocks counters are reset to zero.


QNX Neutrino

Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes