devc-ser8250; returning from ser_intr()

bridged with qdn.public.ddk
Post Reply
mik

devc-ser8250; returning from ser_intr()

Post by mik » Tue Sep 30, 2003 10:22 pm

I am altering the devc-ser8250 driver. At the end of the
ser_intr() function it returns a event which eventually unblocks
the while(1) loop found in ttc.c. I am interested in triggering
this event outside the interrupt handler using MsgDeliverEvent()
but I need a rcvid. What should I use? The altered devc-ser8250
has two threads, one thread doing most of what the original
driver does, and a new thread sending some extra characters
to /dev/ser1 every 10 seconds by calling tti().

The only idea I have is to create a ChannelCreate(), but that does
not really give me a rcvid.

Any help is appreciated

Mike

mik

Re: devc-ser8250; returning from ser_intr()

Post by mik » Wed Oct 01, 2003 6:08 pm

I have looked more closely at the ttc.c code and realized a timer is being
used.
Unfortunatly I am also using a timer in the 2-thread devc-ser8250. How can
I have two timers under one process running at different time intervals?

"mik" <mkonstantinides@connecttech.com> wrote in message
news:blcur8$6nv$1@inn.qnx.com...
I am altering the devc-ser8250 driver. At the end of the
ser_intr() function it returns a event which eventually unblocks
the while(1) loop found in ttc.c. I am interested in triggering
this event outside the interrupt handler using MsgDeliverEvent()
but I need a rcvid. What should I use? The altered devc-ser8250
has two threads, one thread doing most of what the original
driver does, and a new thread sending some extra characters
to /dev/ser1 every 10 seconds by calling tti().

The only idea I have is to create a ChannelCreate(), but that does
not really give me a rcvid.

Any help is appreciated

Mike

David Gibbs

Re: devc-ser8250; returning from ser_intr()

Post by David Gibbs » Thu Oct 02, 2003 9:19 pm

mik <mkonstantinides@connecttech.com> wrote:
I have looked more closely at the ttc.c code and realized a timer is being
used.
Unfortunatly I am also using a timer in the 2-thread devc-ser8250. How can
I have two timers under one process running at different time intervals?
Create two timers, give them different time intervals, probably give them
different events.

That is, call timer_create() a second time. You can have lots of timers
in one process.

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

David Gibbs

Re: devc-ser8250; returning from ser_intr()

Post by David Gibbs » Thu Oct 02, 2003 9:21 pm

mik <mkonstantinides@connecttech.com> wrote:
I am altering the devc-ser8250 driver. At the end of the
ser_intr() function it returns a event which eventually unblocks
the while(1) loop found in ttc.c. I am interested in triggering
this event outside the interrupt handler using MsgDeliverEvent()
but I need a rcvid. What should I use? The altered devc-ser8250
has two threads, one thread doing most of what the original
driver does, and a new thread sending some extra characters
to /dev/ser1 every 10 seconds by calling tti().

The only idea I have is to create a ChannelCreate(), but that does
not really give me a rcvid.
Assuming you want a pulse:
coid = ConnectAttach(chid, ...) to your Channel, then MsgSendPulse(coid, ...);

If you want to send yourself a signal:

raise(), sigqueue(), kill(), pthread_kill().

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

Post Reply

Return to “qdn.public.ddk”