Porting Linux IO Card Driver to QNX

Hi,

I’m trying to port a Linux PCI IO Card to QNX, can anyone tell me what is the equivalent function of “iopl” in QNX6??? Do I really have to get the IO Permission first before I can write to the IO port?

Code from Linux Driver:

void IOPermission()
{
if(iopl(3)<0)
{
fprintf(stderr, “NO IO PERMISSION\n”);
exit(EXIT_FAILURE);
}else
puts(“Write permission granted to I/O Ports”);
}//IOPermission

Thanks

Roger

Look at documentation for ThreadCtl()

Amazing, it’s working now!

Thanks

Roger