bioerror(D3)

bioerror - manipulate error fields within a buffer header

As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.

NAME
     bioerror - manipulate error fields within a buffer header

SYNOPSIS
     #include <sys/types.h>
     #include <sys/buf.h>
     #include <sys/ddi.h>
     void bioerror(buf_t *bp, int errno);

   Arguments
     bp        Pointer to the buffer header structure.

     errno     Error number to be set, or zero to indicate that the error
               fields within the buffer header should be cleared.

DESCRIPTION
     bioerror is used to manipulate the error fields within a buffer header
     (buf(D4) structure).

   Return Values
     None

USAGE
     Driver code (for example, a strategy(D2) routine) that wishes to report
     an I/O error condition associated with the buffer pointed to by bp should
     call bioerror with errno set to the appropriate error number.  This will
     set the appropriate fields within the buffer header so that higher level
     code can detect the error and retrieve the error number using
     geterror(D3).

     The error fields within the buffer header can be cleared by calling
     bioerror with errno set to zero.

     On multiprocessor systems, DDI/DKI conforming drivers are no longer
     permitted to manipulate the error fields of the buf structure directly.
     bioerror must be used for this purpose.

   Level
     Base or Interrupt.

   Synchronization Constraints
     Does not sleep.

     Driver-defined basic locks, read/write locks, and sleep locks may be held
     across calls to this function.

REFERENCES
     buf(D4), errnos(D5), geteblk(D3), geterror(D3), getrbuf(D3),
     ngeteblk(D3), strategy(D2)