DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

qinit(D4str)


qinit -- STREAMS queue initialization structure

Synopsis

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

Description

The qinit structure contains pointers to processing procedures and default values for a queue(D4str). Drivers and modules declare qinit structure for their read and write queues, and place the addresses of the structures in their streamtab(D4str) and drvinfo(D4) structures. After the initial declaration, all members are intended to be read-only.

Usage

There is usually one qinit structure for the read side of a module or driver, and one qinit structure for the write side.

Structure definitions

The qinit structure contains the following members:
   int	(*qi_putp)();
   int	(*qi_srvp)();
   int	(*qi_qopen)();
   int	(*qi_qclose)();
   int	(*qi_qadmin)();
   struct module_info	*qi_minfo;
   struct module_stat	*qi_mstat;

Structure members


qi_putp
contains the address of the put(D2str) routine for the queue.

qi_srvp
contains the address of the srv(D2str) service routine for the queue. If there is no service routine, this member should be set to NULL.

qi_qopen
For DDI versions prior to version 8, contains the address of the open(D2str) routine for the driver or module. Only the read-side qinit structure need contain the routine address. The write-side value should be set to NULL. For DDI 8 and later versions, this member is unused and should be set to NULL; the information is picked up from the drvops(D4) structure.

qi_qclose
For DDI versions prior to version 8, contains the address of the close(D2str) routine for the driver or module. Only the read-side qinit structure need contain the routine address. The write-side value should be set to NULL. For DDI 8 and later versions, this member is unused and should be set to NULL; the information is picked up from the drvops(D4) structure.

qi_minfo
contains the address of the module_info(D4str) structure for the driver or module.

qi_qadmin
unused; set to NULL.

qi_mstat
obsolete; set to NULL.

Applicable hardware

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

Difference between versions

For DDI versions prior to version 8 and all ODDI versions, the read-side qinit structure must populate the qi_qopen and qi_qclose members.

An example of the definition for a pre-DDI 8 or ODDI tok driver is:

struct qinit tokurinit={NULL,NULL,tokopen,tokclose,NULL,&tokminfo,NULL};

struct qinit tokuwinit={tokuwput,NULL,tokopen,tokclose,NULL,&tokminfo,NULL};
For DDI 8 drivers, the drvops(D4) structure contains pointers to the driver's open and close entry point routines.

References

drvinfo(D4), module_info(D4str), queue(D4str), streamtab(D4str)

Examples

For example, the header file for the tok driver might contain the following lines:
   struct qinit tokurinit = { NULL, NULL, NULL, NULL, NULL, &tokminfo, NULL };

struct qinit tokuwinit = { tokuwput, NULL, NULL, NULL, NULL, &tokminfo, NULL };

19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005