Handle an _IO_MMAP message
#include <sys/iofunc.h>
int iofunc_mmap ( resmgr_context_t * hdr,
io_mmap_t * msg,
iofunc_ocb_t * ocb,
iofunc_attr_t * attr );
BlackBerry 10.0.0
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The iofunc_mmap() helper function provides functionality for the _IO_MMAP message. The _IO_MMAP message is an outcall from the Memory Manager (a part of the QNX Neutrino microkernel's procnto ).
Note that if the Process Manager is to be able to execute from this resource, then you must use the iofunc_mmap() function.
io_mmap_t structure
The io_mmap_t structure holds the _IO_MMAP message received by the resource manager:
struct _io_mmap {
uint16_t type;
uint16_t combine_len;
uint32_t prot;
uint64_t offset;
struct _msg_info info;
uint32_t required_prot;
uint32_t zero[5];
};
struct _io_mmap_reply {
uint32_t zero;
uint32_t allowed_prot;
uint64_t offset;
int32_t coid;
int32_t fd;
};
typedef union {
struct _io_mmap i;
struct _io_mmap_reply o;
} io_mmap_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).
The i member is a structure of type _io_mmap that contains the following members:
See the required_prot field, below.
The resource manager can tell whether a new or old procnto is talking to it by looking at the required_prot field. If it's nonzero, it's a new procnto, and the code should pay attention to the field. If required_prot is zero, it's an old procnto, and the code should use prot as the required permissions.
The o member of the io_mmap_t structure is a structure of type _io_mmap_reply that contains the following members:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |