*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> BUF_LOCK (9r)              
Title
Content
Arch
Section
 

BUF_LOCK(9r)

Contents


NAME    [Toc]    [Back]

       BUF_LOCK - General: Locks the specified I/O buffer

SYNOPSIS    [Toc]    [Back]

       void BUF_LOCK(
               struct buf *bp );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to a buf structure.

DESCRIPTION    [Toc]    [Back]

       The  BUF_LOCK routine locks the specified I/O buffer.  The
       routine masks all disk and tape controller interrupts  (by
       calling  the splbio routine). 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    [Toc]    [Back]

       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 concurrency. 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    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Routines: BUF_UNLOCK(9r)



                                                     BUF_LOCK(9r)
[ Back ]
 Similar pages
Name OS Title
BUF_TIMELOCK FreeBSD locks a buffer
BUF_LOCK FreeBSD locks a buffer
BUF_UNLOCK Tru64 General: Unlocks the specified I/O buffer
get_random_bytes_wait Tru64 General: Returns the requested number of random bytes and places them in a buffer.
get_random_bytes Tru64 General: Returns the requested number of random bytes and stores them in a buffer.
omp_lock IRIX Set of procedures to manipulate locks
pthread_mutex_lock Tru64 Locks an unlocked mutex
tis_mutex_lock Tru64 Locks an unlocked mutex
pthread_mutex_lock IRIX mutual exclusion locks
dxpause Tru64 locks (pauses) an X display
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service