Access to hardware inside an interrupt handler

Hi,
I’m using an interrupt handler, inside it I have first to check the device
causing the interrupt and second to communicate with a dedicated thread
(waiting with InterruptWait) of the process to pass data : for this feature
I’m using a data area (with size) provided with the function
InterruptAttach. My problem is how to use these two area inside the
interrupt handler (device memory and data area) ? Inside my process I have
mapped the device memory using the mmap_device_memory function, and passed
the corresponding pointeur to the handler inside the data area. Is it good
to do this (or is the device memory mapped still available when the
interrupt handler is called) ?.
Additional information : I am using Neutrino 6.2.1 on a PPC with MMU
Additionnal question : is mlock necessary before passing the data area to
InterruptAttached ?
Thanks for help.
Best Regards
Alan

I’m using an interrupt handler, inside it I have first to check the device
causing the interrupt and second to communicate with a dedicated thread
(waiting with InterruptWait) of the process to pass data : for this feature
I’m using a data area (with size) provided with the function
InterruptAttach. My problem is how to use these two area inside the
interrupt handler (device memory and data area) ? Inside my process I have
mapped the device memory using the mmap_device_memory function, and passed
the corresponding pointeur to the handler inside the data area. Is it good
to do this (or is the device memory mapped still available when the
interrupt handler is called) ?.
Additional information : I am using Neutrino 6.2.1 on a PPC with MMU
Additionnal question : is mlock necessary before passing the data area to
InterruptAttached ?

Not today. And you also have full access to all global memory/variables
of your process inside of the handler.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/