brelse Kernel Service

Purpose

Frees the specified buffer.

Syntax

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

void brelse ( bp)
struct buf *bp;

Parameter

Item Description
bp Specifies the address of the buf structure to be freed.

On a platform that supports storage keys, the passed in bp parameter must be in the KKEY_PUBLIC or KKEY_BLOCK_DEV protection domain.

Description

The brelse kernel service frees the buffer to which the bp parameter points.

The brelse kernel service awakens any processes waiting for this buffer or for another free buffer. The buffer is then put on the list of available buffers. The buffer is also marked as not busy so that it can either be reclaimed or reallocated.

The brelse service has no return values.

Execution Environment

The brelse kernel service can be called from either the process or interrupt environment.