[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    biowait(9F) manual page Table of Contents

Name

biowait - suspend processes pending completion of block I/O

Synopsis


#include <sys/types.h>
#include <sys/buf.h>

int biowait(struct buf *bp);

Interface Level

Architecture independent level 1 (DDI/DKI).

Arguments

bp
Pointer to the buf structure describing the transfer.

Description

Drivers allocating their own buf structures with getrbuf(9F) can use the biowait() function to suspend the current thread and wait for completion of the transfer.

Drivers must call biodone(9F) when the transfer is complete to notify the thread blocked by biowait(). biodone() is usually called in the interrupt routine.

Return Values

  1. on success
    non-0
    on I/O failure. biowait() calls geterror(9F) to retrieve the error number which it returns.

    Context

    biowait() can be called from user context only.

    See Also

    biodone(9F) , geterror(9F) , getrbuf(9F) , buf(9S)


    Table of Contents