RTP: AttachInterrupt on vect 2 hangs

Attaching an ISR on Vector 2 causes RTP to hang. Why? (I know INT2 is
cascaded).
The test app use is attached.

-david

David Alessio <david.alessio@hsa.hitachi.com> wrote:

This is a multi-part message in MIME format.
--------------E2ADCD608BA27C096EC9C810
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



Attaching an ISR on Vector 2 causes RTP to hang. Why? (I know INT2 is
cascaded).
The test app use is attached.

Can you post the test application in-line rather than as an
attachment?

Thanks,
-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/neutrino.h>


//
// dummy interrupt handler
//
const struct sigevent *
interrupt_handler(void area, int id)
{
// InterruptMask(int_vec, int_id);
return NULL;
}


int
main(int argc, char
argv[])
{
int int_id;
int int_vec = 2;


// request I/O privity
if (EOK != ThreadCtl(_NTO_TCTL_IO, 0))
{
perror(“ThreadCtl Failed”);
exit(-1);
}

int_id = InterruptAttach(int_vec, interrupt_handler, NULL, 0,
_NTO_INTR_FLAGS_TRK_MSK);

if (int_id == -1)
printf(“0x%08X: --\t”, int_vec);
else
{
InterruptDetach(int_id);
printf(“0x%08X: OK\t”, int_vec);
}
return 0;
}



David Gibbs wrote:

David Alessio <> david.alessio@hsa.hitachi.com> > wrote:
This is a multi-part message in MIME format.
--------------E2ADCD608BA27C096EC9C810
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Attaching an ISR on Vector 2 causes RTP to hang. Why? (I know INT2 is
cascaded).
The test app use is attached.

Can you post the test application in-line rather than as an
attachment?

Thanks,
-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Alessio <david.alessio@hsa.hitachi.com> wrote:

This is a multi-part message in MIME format.
--------------E2ADCD608BA27C096EC9C810
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



Attaching an ISR on Vector 2 causes RTP to hang. Why? (I know INT2 is
cascaded).

Thanks for the app.

Actually, it is detaching the interrupt handler on vector that is causing
the problem.

What I think is happening: When you attach, you are the first handler
for interrupt 2, when you detach, there are, now, no handlers for irq 2,
so QNX 6 is automatically masking interrupt 2… oops.

RTP doesn’t actually hang – it is just that anything that is dependent
on an upper bank interrupt won’t get the interrupts. I debugged this
in text mode, I could still type, etc – but as soon as I went to my
file system, I didn’t get a response, or got an incredibly delayed
response. But, I threw a copy of pidin and less into /dev/shmem, and
was able to run them fine.

I’ve generated a Problem Report in our bug-tracking database for
this issue, PR# 12748

As a work-around, this has got to be one of those, “it hurts when
I do this”, well, “don’t do that”. Hopefully you don’t actually have
any hardware using irq 2, so you don’t actually need to attach to it.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

I’ve generated a Problem Report in our bug-tracking database for
this issue, PR# 12748

As a work-around, this has got to be one of those, “it hurts when
I do this”, well, “don’t do that”. Hopefully you don’t actually have
any hardware using irq 2, so you don’t actually need to attach to it.

Thanks. This isn’t anything that I need – it’s just something I
discovered while exercising RTP…

David Alessio <david.alessio@hsa.hitachi.com> wrote:

I’ve generated a Problem Report in our bug-tracking database for
this issue, PR# 12748

As a work-around, this has got to be one of those, “it hurts when
I do this”, well, “don’t do that”. Hopefully you don’t actually have
any hardware using irq 2, so you don’t actually need to attach to it.


Thanks. This isn’t anything that I need – it’s just something I
discovered while exercising RTP…

Thanks for letting us know that you found it, so we can clean it up.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.