Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

put(9f) [sunos man page]

put(9F) 						   Kernel Functions for Drivers 						   put(9F)

NAME
put - call a STREAMS put procedure SYNOPSIS
#include <sys/stream.h> #include <sys/ddi.h> void put(queue_t *q, mblk_t *mp); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to a STREAMS queue. mp Pointer to message block being passed into queue. DESCRIPTION
put() calls the put procedure ( put(9E) entry point) for the STREAMS queue specified by q, passing it the message block referred to by mp. It is typically used by a driver or module to call its own put procedure. CONTEXT
put() can be called from a STREAMS module or driver put or service routine, or from an associated interrupt handler, timeout, bufcall, or esballoc call-back. In the latter cases, the calling code must guarantee the validity of the q argument. Since put() may cause re-entry of the module (as it is intended to do), mutexes or other locks should not be held across calls to it, due to the risk of single-party deadlock (put(9E), putnext(9F), putctl(9F), qreply(9F)). This function is provided as a DDI/DKI conforming replacement for a direct call to a put procedure. SEE ALSO
put(9E), freezestr(9F), putctl(9F), putctl1(9F), putnext(9F), putnextctl(9F), putnextctl1(9F), qprocson(9F), qreply(9F) Writing Device Drivers STREAMS Programming Guide NOTES
The caller cannot have the stream frozen when calling this function. See freezestr(9F). DDI/DKI conforming modules and drivers are no longer permitted to call put procedures directly, but must call through the appropriate STREAMS utility function, for example, put(9E), putnext(9F), putctl(9F), and qreply(9F). This function is provided as a DDI/DKI conforming replacement for a direct call to a put procedure. The put() and putnext() functions should be called only after qprocson() is finished. SunOS 5.10 28 Apr 1992 put(9F)

Check Out this Related Man Page

qprocson(9F)						   Kernel Functions for Drivers 					      qprocson(9F)

NAME
qprocson, qprocsoff - enable, disable put and service routines SYNOPSIS
#include <sys/stream.h> #include <sys/ddi.h> void qprocson(queue_t *q); void qprocsoff(queue_t *q); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the RD side of a STREAMS queue pair. DESCRIPTION
qprocson() enables the put and service routines of the driver or module whose read queue is pointed to by q. Threads cannot enter the mod- ule instance through the put and service routines while they are disabled. qprocson() must be called by the open routine of a driver or module before returning, and after any initialization necessary for the proper functioning of the put and service routines. qprocson() must be called before calling put(9F), putnext(9F), qbufcall(9F), qtimeout(9F), qwait(9F), or qwait_sig(9F). qprocsoff() must be called by the close routine of a driver or module before returning, and before deallocating any resources necessary for the proper functioning of the put and service routines. It also removes the queue's service routines from the service queue, and blocks until any pending service processing completes. The module or driver instance is guaranteed to be single-threaded before qprocson() is called and after qprocsoff() is called, except for threads executing asynchronous events such as interrupt handlers and callbacks, which must be handled separately. CONTEXT
These routines can be called from user or interrupt context. SEE ALSO
close(9E), open(9E), put(9E), srv(9E), put(9F), putnext(9F), qbufcall(9F), qtimeout(9F), qwait(9F), qwait_sig(9F) Writing Device Drivers STREAMS Programming Guide NOTES
The caller may not have the STREAM frozen during either of these calls. SunOS 5.10 11 Nov 1992 qprocson(9F)
Man Page