#include <sys/stream.h>
#include <sys/ddi.h>
void qwriter( queue_t *qp, mblk_t *mp, void (*func)(), int perimeter);
Solaris DDI specific (Solaris DDI).
(*func)(queue_t *qp, mblk_t *mp);
qwriter() will acquire exclusive access immediately if possible, in which case the specified callback function will be executed before qwriter() returns. If this is not possible, qwriter() will defer the upgrade until later and return before the callback function has been executed. Modules should not assume that the callback function has been executed when qwriter() returns. One way to avoid dependencies on the execution of the callback function is to immediately return after calling qwriter() and let the callback function finish the processing of the message.
When qwriter() defers calling the callback function, the STREAMS framework will prevent other messages from entering the inner perimeter associated with the queue until the upgrade has completed and the callback function has finished executing.
qwriter() can only be called from an put(9E) or srv(9E) routine, or from a qwriter(), qtimeout(9F) , or qbufcall(9F) callback function.