DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_access(D3sdi)


sdi_access -- claim or release ownership of a given device

Synopsis

   #include <sys/sdi.h>

int sdi_access(struct sdi_edt *edtp, int access, struct owner *owner);

Description

sdi_access( ) claims ownership of a device by target drivers. If the requested device is currently claimed by a target driver, sdi_access( ) refuses any requests to add the device to an owner list and any attempts to claim the device.

Arguments


edtp
pointer to the Equipped Device Table entry associated with the device

access
flag indicating whether ownership is to be claimed or released Valid values are:


SDI_CLAIM
claim a device for driver access

SDI_ADD
add an owner block to the target driver's list

SDI_DISCLAIM
release a claim to a device

SDI_REMOVE
remove the driver from owner list

owner
defines the owner for the device (see owner(D4sdi))

Context and synchronization

Blockable context.

Applicable hardware

x86/Pentium compatible architectures

Version applicability

sdi: 1, 2, 3, 4 target drivers.

Return values

On success, sdi_access returns SDI_RET_OK, indicating that the access is allowed and has been set up. On failure, it returns SDI_RET_ERR, indicating the requested access is not allowed.

Usage

sdi_access is used internally by SDI to claim and release ownership of devices on target driver's behalf.

If the device is not currently claimed by a target driver, sdi_access:

  1. Adds the device to the calling target driver's list for SDI_ADD. requests

  2. Makes the device the target driver's current drive for SDI_CLAIM requests.

References

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