04/21/2008 6:54 AM
post7101
|
> You need to initialise sEvent first -
>
> SIGEV_INTR(&sEvent)
>
> Also note that the interrupt will remain masked when InterruptWait
> returns - so you will need to call InterruptUnmask() on it
> in order to receive any more interrupts on that level.
>
> Lakshmi Narasaiah wrote:
> > Hello,
> >
> > I am using the InterruptAttachEvent () API as follows
> >
> > void thread_func()
> > {
> >
> > cout <<"HI, I am a thread" << endl;
> > ThreadCtl ( _NTO_TCTL_IO, NULL);
> >
> > struct sigevent sEvent;
> >
> > InterruptAttachEvent (10, &sEvent, 0);
> >
> > while (1)
> > {
> > InterruptWait (NULL, NULL);
> > }
> > }
> >
> > Is this the correct way of using the InterruptAttachEvent API?
> >
> > If yes how do we raise this event so that the InterruptWait (NULL,
> > NULL); call unblocks?
> >
> > Regards,
> > Lakshmi.
> >
> > _______________________________________________
> > General
> > http://community.qnx.com/sf/go/post7088
> >
>
> --
> cburgess@qnx.com
Hi Colin,
Thanks for the input,
How can we simulate the raising of an Hardware Interrupt?
Regards,
Lakshmi.
|
|
|