DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer 5 Release 5 STREAMS interface

Multithreaded STREAMS

A new SCO OpenServer 5 Release 5 feature is support for multithreaded STREAMS drivers. This allows STREAMS drivers to run on all CPUs in a multiprocessing platform, which can significantly improve system performance.

The specifics of the multithreaded STREAMS interface are summarized below:

To register the task-time level of a STREAMS driver as multithreaded, issue the sdistributed(D3oddi) function from the driver's xxopen( ) routine after all other initialization is complete. Arguments to sdistributed( ) indicate which put and service routines are multithreaded. Use the MPSTR_QLOCK(D3str) and MPSTR_QRELE(D3str) functions to protect critical code that accesses the STREAMS queue_t data structure. Use the MPSTR_STPLOCK(D3str) and MPSTR_STPRELE(D3str) functions to protect critical code that accesses the Stream head.

To multithread the interrupt level of a STREAMS driver, issue the idistributed(D3oddi) function from the driver's open(D2str) routine.

Multithreaded drivers must use locks rather than the spl(D3oddi) functions to protect critical code sections. For more information about the SCO multiprocessing architecture and protecting critical code sections in multithreaded drivers, see ``Multithreading device drivers''.


© 2005 The SCO Group, Inc. All rights reserved.