Streams device driver programming questions

William Mulert wdm at icc.com
Sat Jan 13 09:11:34 AEST 1990


I need some assistance with streams programming.

None of the documentation I have tells me much about how to
build and send a new message. I am writing a driver, and the
interrupt routine for the device has new data which it needs
to put in an M_DATA message and send it upstream. Can anyone
show me the proper way to:

1. Allocate the message block?
2. Fill in the fields in the mblk_t and dblk_t structures?
3. Attend to any other important considerations?

I am assuming the isr can simply putq() the new message on the
read side queue, and allow the drivers read side service routine
to respond to the upstream flow control conditions, and pass
the message upstream when canputnext() says it's ok.

What should the driver programmer do if canput() says you
can't use putq() to enqueue a message on the drivers own
read queue? Is this a case where data may be lost due to
flow control?


-- 
                              Bill Mulert
                   Intercomputer Communications Corp.
                        Cincinnati, Ohio  45236
     (513)-745-0500           wdm at ICC.COM          ...!ukma!spca6!icc!wdm



More information about the Comp.unix.questions mailing list