Paul N. Leonard <firstname.lastname@example.org> wrote:
I believe you need to set the privity level during compile to 0 and
you must run as root in order to access IO of any sort.
During compilation, add the flag “-T 0” to your other flags and see
if that helps.
That is how it works under QNX4. The key is making sure you are
running the code as root. Also, you should be making sure you check
the return values of all your function calls and error-ing out on
any failure. You would have gotten an error on your call to ThreadCtrl().
The following is a small program I make to write I/O port. But it doesn’t
After I compile it with qcc and run it, “Memory Fault(Core Dump)” will
Can anyone help me?
/* Library for I/O and Thread Control*/
#define cfr 0x2e6 /* configulation register */
ThreadCtl(_NTO_TCTL_IO,0);/* Thread control*/
mmap_device_io(1,cfr); /* Map device I/O */
out8( cfr, 0x80 ); /* Software Reset*/
Chris McKillop <email@example.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –