qwriter man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

QWRITER(9F)							   QWRITER(9F)

NAME
       qwriter - asynchronous STREAMS perimeter upgrade

SYNOPSIS
       #include <sys/stream.h>
       #include <sys/ddi.h>

       void qwriter(queue_t *qp, mblk_t *mp, void (*func)(), int perimeter);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       qp
		     Pointer to the queue.

       mp
		     Pointer  to a message that will be passed in to the call‐
		     back function.

       func
		     A function that will be called  when  exclusive  (writer)
		     access has been acquired at the specified perimeter.

       perimeter
		     Either PERIM_INNER or PERIM_OUTER.

DESCRIPTION
       qwriter()  is  used  to	upgrade	 the access at either the inner or the
       outer perimeter from shared to exclusive and call the  specified	 call‐
       back  function  when the upgrade has succeeded. See mt-streams(9F). The
       callback function is called as:

	 (*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 call‐
       ing  qwriter()  and  let the callback function finish the processing of
       the message.

       When qwriter() defers calling the callback function, the STREAMS frame‐
       work  will  prevent  other  messages  from entering the inner perimeter
       associated with the queue until the upgrade has completed and the call‐
       back function has finished executing.

CONTEXT
       qwriter()  can  only  be	 called from an put(9E) or srv(9E) routine, or
       from a qwriter(), qtimeout(9F), or qbufcall(9F) callback function.

SEE ALSO
       put(9E), srv(9E), mt-streams(9F), qbufcall(9F), qtimeout(9F)

       STREAMS Programming Guide

       Writing Device Drivers

				  Mar 1, 1993			   QWRITER(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net