Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ brelse(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

biodone(9F)

biowait(9F)

clrbuf(9F)

brelse(9F)

NAME

brelse − return buffer to the bfreelist

SYNOPSIS

#include <sys/types.h>
#include <sys/buf.h>
void brelse(struct buf ∗bp);

ARGUMENTS

bp Pointer to the buf structure. 

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI). 

DESCRIPTION

brelse() returns a previously allocated buffer to the buffer free list.  First, brelse() wakes up processes sleeping on the buffer.  After the driver function is finished with the buffer, brelse() returns the buffer header to a list of free buffers and awakens any processes that called sleep() to wait for a free buffer on the free list.

RETURN VALUES

None, however, if b_flags has B_ERROR enabled due to an error in an earlier I/O transfer, b_flags is ORed with B_STALE and B_AGE, B_ERROR and B_DELWRI are disabled, and b_error is set to 0. 

CONTEXT

brelse() can be called from user or interrupt context.

SEE ALSO

biodone(9F), biowait(9F) clrbuf(9F)

SunOS 5.1 Writing Device Drivers

SunOS 5.1  —  Last change: 11 Apr 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026