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

sdistributed(D3oddi)


sdistributed -- indicate that a STREAMS driver can have multiprocessor access

Syntax

   #include <sys/stream.h>
   

void sdistributed(queue_t *q, int flags);

Description

The sdistributed function is called from a STREAMS driver's xxopen routine to register the device as multithreaded.

Arguments


q
Identifies the calling queue

flags
Informs the STREAMS subsystem about which portions of the driver/module code have been multithreaded. Messages that cross a multithreaded to single-threaded boundary are queued in a global putnext(D3str) queue for deferred processing on the default CPU. The supported flags are as follows:


SDIST_RPUTP
read put procedure is multithreaded

SDIST_RSRVP
read service procedure is multithreaded

SDIST_WPUTP
write put procedure is multithreaded

SDIST_WSRVP
write service procedure is multithreaded

Return values

None. sdistributed( ) panics if bad values are passed.

Usage

Context and synchronization

Initialization or blockable context

Hardware applicability

All

Version applicability

oddi: 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

This function is not supported in DDI. STREAMS drivers use the same conventions to indicate that they are multithreaded as other types of drivers. See ``Multithreaded drivers'' in HDK Technical Reference.

References

bdistributed(D3oddi), cdistributed(D3oddi), idistributed(D3oddi), putnext(D3str)

``Multithreaded drivers'' in HDK Technical Reference

Examples

The following code fragment registers a STREAMS driver as having multithreaded read put, read service, write put, and write service routines.
   #include <sys/stream.h>
   

int xxopen(register queue_t *q, int dev, int flag, int sflag); { ... sdistributed(q, SDIST_RPUTP|SDIST_RSRVP|SDIST_WPUTP|SDIST_WSRVP); }


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005