buf_lock(9r) osf1 man page | unix.com

Query: buf_lock

OS: osf1

Section: 9r

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

BUF_LOCK(9r)															      BUF_LOCK(9r)

NAME
BUF_LOCK - General: Locks the specified I/O buffer
SYNOPSIS
void BUF_LOCK( struct buf *bp );
ARGUMENTS
Specifies a pointer to a buf structure.
DESCRIPTION
The BUF_LOCK routine locks the specified I/O buffer. The routine masks all disk and tape controller interrupts (by calling the splbio rou- tine). It sets the mutual exclusion buffer lock member, b_lock, of the specified buf structure pointer. The BUF_LOCK routine then sets the b_flags member of the specified buf structure pointer to B_BUSY to indicate that this buffer is being used. Finally, BUF_LOCK resets the CPU priority level (by calling the splx routine).
NOTES
You should design in your kernel modules to hold the I/O buffer lock for as short a period of time as possible to allow maximum concur- rency. You should also release the I/O buffer lock by calling the BUF_UNLOCK routine before returning from the module's entry point.
RETURN VALUES
None
SEE ALSO
Routines: BUF_UNLOCK(9r) BUF_LOCK(9r)
Related Man Pages
buf(9s) - osf1
lock_read(9r) - osf1
lock_try_write(9r) - osf1
biodone(9f) - sunos
biodone(9f) - php
Similar Topics in the Unix Linux Community
Throw my Toys out of the Pram!
Low Impact PHP Errors and Logging Levels
PHP Write Man Pages to MySQL DB
Denial Of Service Attack Update