qnx_hint_attach

When I need to hook and interrupt using the function:
int_id = qnx_hint_attach (irq, &isr_function, data_segment);

what do I need to put for the data_segment if I am not modifying or
using any global variables in my isr?

All i’m trying to do is send a proxy message back to my process to
kick a floating point motion control routine.

Thanks,

Erick

QNXNewbie@nomail.com wrote:

When I need to hook and interrupt using the function:
int_id = qnx_hint_attach (irq, &isr_function, data_segment);

what do I need to put for the data_segment if I am not modifying or
using any global variables in my isr?

All i’m trying to do is send a proxy message back to my process to
kick a floating point motion control routine.

Why not pass my_ds() (declared in “sys/inline.h”) ?

How is it that you plan to get the proxy number to your ISR without
access to the DS ? Typically, one stores the return from
qnx_proxy_attach in a global and returns that from the ISR.

QNXNewbie@nomail.com wrote:

Doesn’t the kernal/proxy routines take care of this?

Establishing addressability ? Yes. But they establish addressability
to the segment that you provide. It might help to know that QNX 4.1 was
a 16/32 bit operating system, so it wasn’t silly (at the time) to have
a segment passed in.

So is my understanding of what your saying correct?
That I should do something like this:

pid_int_proxy = qnx_proxy_attach(0,NULL,0,-1); // pid_int_proxy is
global

qnx_hint_attach (irq, &isr_function, FP_SEG(pid_int_proxy));

That would work fine. In your ISR: “return pid_int_proxy;”.

A bonus suggestion. If your motion control stuff is real-time
(highly probable I am guessing), then instead of inheriting the
default priority for the proxy (i.e. passing -1 to qnx_proxy_attach),
set a high priority for the proxy. In the initialization of your
process, call qnx_pflags() and set your process to receive in
priority order, and to float to priority (see qnx_pflags docs
for details).

Doesn’t the kernal/proxy routines take care of this?
I’m new to this so I don’t know,

So is my understanding of what your saying correct?
That I should do something like this:

pid_int_proxy = qnx_proxy_attach(0,NULL,0,-1); // pid_int_proxy is
global

qnx_hint_attach (irq, &isr_function, FP_SEG(pid_int_proxy));


Erick

just for reference I’m using the example for an ISR on
http://www.qenesis.com/support/interrupts.html


On Wed, 09 Oct 2002 12:33:59 +0000, Rennie Allen <rallen@csical.com>
wrote:

QNXNewbie@nomail.com > wrote:
When I need to hook and interrupt using the function:
int_id = qnx_hint_attach (irq, &isr_function, data_segment);

what do I need to put for the data_segment if I am not modifying or
using any global variables in my isr?

All i’m trying to do is send a proxy message back to my process to
kick a floating point motion control routine.

Why not pass my_ds() (declared in “sys/inline.h”) ?

How is it that you plan to get the proxy number to your ISR without
access to the DS ? Typically, one stores the return from
qnx_proxy_attach in a global and returns that from the ISR.