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

bdistributed(D3oddi)


bdistributed -- indicate block driver can have multiprocessor access

Syntax

#include <sys/conf.h>

int bdistributed(int (*xxstrategy)(), int flags);

Description

The bdistributed routine marks a block driver as being capable of multi-processor access. Such a driver has its specified functions executed on any of the available processors.

Arguments


xxstrategy
If this argument matches a strategy(D2oddi) routine name in the block device switch table (bdevsw), then flags are stored in an array associated with bdevsw. (bdevsw is used by the kernel to access a block device driver.)


flags
Must include DIST_BDEV_STRATEGY ORed with the following values (defined in <sys/conf.h>) as desired:

DIST_BDEV_CLOSE
mark a driver's xxclose routine as multithreaded

DIST_BDEV_OPEN
mark a driver's xxopen routine as multithreaded

DIST_BDEV_PRINT
mark a driver's xxprint routine as multithreaded

Return values

On a multiprocessor system, 1 is returned if the first argument, xxstrategy, was found in the bdevsw table; the driver is now capable of multiprocessor access. Zero (0) is returned if xxstrategy is not found. 0 is always returned on a uniprocessor system.

Usage

Context and synchronization

Initialization context

Hardware applicability

All

Version applicability

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

Differences between versions

DDI does not support this function. See ``Multithreaded drivers'' in HDK Technical Reference for information about how multithreaded drivers are identified in DDI.

References

all_io(D3oddi), cdistributed(D3oddi), cmn_err(D3oddi), idistributed(D3oddi), iopolldistributed(D3oddi), ldistributed(D3oddi), sdistributed(D3oddi),

``Multithreaded drivers'' in HDK Technical Reference

Examples

The following example illustrates how bdistributed( ) is used in a driver's init(D2oddi) routine:
   xxinit()
   {
      ...
                  bdistributed(xxstrategy, DIST_BDEV_STRATEGY);
      }
      ...
   }

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