QNX 4.25 should I use client/server program calling mmap an

Hi All;
I am responsible for creating a mechanism to communicate with our
companies PCI memory device and I need to do the following:

1.Map in two 8 megabyte apertures, some registers, and PCI Configuration
Space.
2. handle interrupt from PCI device
3. support DMA

So far using a simple program compiled using the -T1 flag I was able to
accomplish everything in #1, but I now need to add interrupt and DMA
support. I had seen where it is possible to use a client/server environment
to have the server respond to custom messages and perform tasks on hardware.
The problem that I am having right now is as follows:

The exact mmap commands that I used in my QNX 4 user program don’t work
reliably in my ‘server’ program after I call the function qnx_name_attach().
I find that mapping memory mostly works but mapping registers always returns
0 from mmap. Here’s a snippet of the code:

int flags=MAP_SHARED;
int prots=PROT_READ| PROT_WRITE | PROT_NOCACHE;
scr_id = qnx_name_attach(0,Server_Name);
if (scr_id == -1){
fprintf(stderr, “Failed qnx_name_attach()!!\n”);
}
/*I do some _CA_PCI calls here to find card. read config space, check for
PCI BIOS,etc */

for (;;){
pid = Receive (0, &msg, sizeof(msg));
nbytes = sizeof(msg.reply.server_status);

switch (msg.command.IOCTL){
case MAP_MEMORY:
printf(“Server received IOCTL shared memory!\n”);

scr_mem_ptr=mmap(0,0x200000,prots,flags,fd,scr_reg.Base_Address_Regs[2]);

Is mmap permitted once a process has called qnx_name attach? Can anyone
please give me some advise on how to proceed…can I use a client/server
model to handle DMA and interrupts too???

Thanks,

Chris Fought