fragmentation fault erro with in*() call

Hello,

Currently I’m using an x86 PC-104 system and I’m trying to access the
watchdog register located at address 0xE0. I’m using the following
code segment:

  1. intptr = mmap_device_io( 1, 0xE0 );
  2. int8 = in8( intptr );

The program caused runtime error ‘fragmentation fault’. Does anyone
know why? Or better yet, what’s the correct way to access this
register located at address 0xE0. Thanks


Tony.

“Tony” <tjcnfl@yahoo.com> wrote in message
news:e572f3ba.0106281130.2d1cd88e@posting.google.com

Hello,

Currently I’m using an x86 PC-104 system and I’m trying to access the
watchdog register located at address 0xE0. I’m using the following
code segment:

  1. intptr = mmap_device_io( 1, 0xE0 );
  2. int8 = in8( intptr );

The program caused runtime error ‘fragmentation fault’. Does anyone
know why? Or better yet, what’s the correct way to access this
register located at address 0xE0. Thanks

You need to get rights to access hardware:

http://qdn.qnx.com/support/docs/neutrino_qrp/lib_ref/t/threadctl.html

Tony.