DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_notifyevent(D3sdi)


sdi_notifyevent -- driver event notification routine

Synopsis

   #include <sys/scsi.h>
   #include <sys/sdi.h>
   #include <sys/ddi.h>

int sdi_notifyevent(int event, struct scsi_adr *scsi_adr, struct sb *sbp);

Description

sdi_notifyevent, together with sdi_addevent(D3sdi) and sdi_rmevent(D3sdi), implements a driver-to-driver communication mechanism for SDI SCSI drivers based on event codes and SCSI device types.

sdi_notifyevent calls all event-handling routines currently registered by drivers which match the SCSI address, scsi_adr, of the associated device type.

Arguments


event
The event type code, as defined in sdi_event(D4sdi).

scsi_adr
Pointer to the SCSI address of the device for which the event is being reported.

sb
Pointer to the sb(D4sdi) (command block) structure (if any) corresponding to the event being reported. It is only used as an argument to the event-handling routine.

Return values

On success, sdi_notifyevent returns SDI_RET_OK. On failure of any of the event-handling routines being called, it returns SDI_RET_ERR.

Usage

Sdi_notifyevent will be called by a driver wanting to notify other drivers of a particular event. The drivers wanting to be notified need to register their corresponding event handlers using sdi_addevent. An example of such an interaction is when the disk driver needs to notify another driver of the first open on a given disk. It will do so by calling sdi_notifyevent with event set to SDI_FIRSTOPEN, scsi_adr set to the address of the disk, and sb set to NULL.

Context and synchronization

Blockable context.

Applicable hardware

x86/Pentium compatible architectures

Version applicability

sdi: 2, 3, 4 target drivers.

References

sdi_addevent(D3sdi), sdi_event(D4sdi), sdi_event_alloc(D3sdi) sdi_event_free(D3sdi), sdi_rmevent(D3sdi)

``SDI event handling'' in HDK Technical Reference


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