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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

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

Helper functions: iofunc_unblock()<br />

Client function: none — kernel action due to signal or timeout<br />

Messages: none — synthesized by library<br />

Data structure: pointer to message structure being interrupted<br />

Description: This is the I/O message version of the unblock outcall, synthesized by the<br />

library as a result of a kernel pulse due to the client’s attempt to unblock during the I/O<br />

message phase. The connect message phase io_unblock() handler is substantially the<br />

same (see the preceding section).<br />

Common to both unblock handlers (connect and I/O) is the characteristic that the<br />

client wishes to unblock, but is at the mercy of the resource manager. The resource<br />

manager must reply to the client’s message in order to unblock the client. (This is<br />

discussed in the Message Passing chapter when we looked at the ChannelCreate()<br />

flags, particularly the _NTO_CHF_UNBLOCK flag).<br />

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

See the section in the Message Passing chapter, titled “Using the<br />

_NTO_MI_UNBLOCK_REQ” for a detailed discussion of unblocking strategies.<br />

io_unlink()<br />

int io_unlink (resmgr_context_t *ctp, io_unlink_t *msg,<br />

RESMGR_HANDLE_T *handle, void *reserved)<br />

Classification: Connect<br />

Default handler: none<br />

Helper functions: iofunc_unlink()<br />

Client function: unlink()<br />

Messages: _IO_CONNECT <strong>with</strong> subtype _IO_CONNECT_UNLINK<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 />

250 Chapter 5 • Resource Managers April 30, 2009

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

Saved successfully!

Ooh no, something went wrong!