26.02.2014 Views

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Alphabetical listing of connect and I/O functions<br />

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG.<br />

Default handler: none<br />

Helper functions: iofunc_link()<br />

Client function: link()<br />

Messages: _IO_CONNECT <strong>with</strong> subtype _IO_CONNECT_LINK<br />

Data structure:<br />

struct _io_connect {<br />

// internal fields (as described above)<br />

uint16_t path_len;<br />

uint8_t extra_type;<br />

uint16_t extra_len;<br />

char path [1];<br />

};<br />

struct _io_connect_link_reply {<br />

uint32_t reserved1 [2];<br />

uint8_t eflag;<br />

uint8_t reserved2 [3];<br />

uint32_t umask;<br />

uint16_t nentries;<br />

uint16_t path_len;<br />

};<br />

typedef union {<br />

struct _io_connect<br />

connect;<br />

struct _io_connect_link_reply link_reply;<br />

} io_link_t;<br />

typedef union _io_link_extra {<br />

struct _msg_info<br />

info;<br />

void<br />

*ocb;<br />

char path [1];<br />

struct _io_resmgr_link_extra resmgr;<br />

} io_link_extra_t;<br />

Description: Creates a new link <strong>with</strong> the name given in the path member of msg to the<br />

already-existing pathname specified by the path member of extra (passed to your<br />

function). For convenience, the ocb member of extra contains a pointer to the OCB for<br />

the existing pathname.<br />

Returns: The status via the helper macro _RESMGR_STATUS.<br />

io_lock()<br />

int io_lock (resmgr_context_t *ctp, io_lock_t *msg, RESMGR_OCB_T<br />

*ocb)<br />

Classification: I/O<br />

Default handler: iofunc_lock_default()<br />

Helper functions: iofunc_lock()<br />

Client functions: fcntl(), lockf(), flock()<br />

Messages: _IO_LOCK<br />

Data structure:<br />

236 Chapter 5 • Resource Managers April 30, 2009

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!