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.

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG. Alphabetical listing of connect and I/O functions<br />

utility mv will perform a cp followed by an rm (the C library function rename() will do<br />

no such thing — it will return only an errno of EXDEV).<br />

Also, all symlinks will be resolved, where applicable, before this function is called,<br />

and the pathnames passed will be absolute and rooted in the filesystem for which this<br />

resource manager is responsible.<br />

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

io_shutdown()<br />

io_space()<br />

int io_shutdown (resmgr_context_t *ctp, io_shutdown_t *msg,<br />

RESMGR_OCB_T *ocb)<br />

This function is reserved by QSS for future use. You should initialize the I/O table<br />

using iofunc_func_init() and not modify this entry.<br />

int io_space (resmgr_context_t *ctp, io_space_t *msg,<br />

RESMGR_OCB_T *ocb)<br />

Classification: I/O<br />

Default handler: none<br />

Helper functions: iofunc_space_verify()<br />

Client functions: chsize(), fcntl(), ftruncate(), ltrunc()<br />

Messages: _IO_SPACE<br />

Data structure:<br />

struct _io_space {<br />

uint16_t<br />

uint16_t<br />

uint16_t<br />

short<br />

uint64_t<br />

uint64_t<br />

};<br />

type;<br />

combine_len;<br />

subtype;<br />

whence;<br />

start;<br />

len;<br />

typedef union {<br />

struct _io_space i;<br />

uint64_t o;<br />

} io_space_t;<br />

Description: This is used to allocate or free space occupied by the resource. The<br />

subtype parameter indicates whether to allocate (if set to F_ALLOCSP) or deallocate<br />

(if set to F_FREESP) storage space. The combination of whence and start give the<br />

location where the beginning of the allocation or deallocation should occur; the<br />

member len indicates the size of the operation.<br />

Returns: The number of bytes (size of the resource) via the helper macro<br />

_RESMGR_STATUS.<br />

April 30, 2009 Chapter 5 • Resource Managers 247

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

Saved successfully!

Ooh no, something went wrong!