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

  man pages->FreeBSD man pages -> vm_map_trylock_read (9)              
Title
Content
Arch
Section
 

vm_map_lock(9)

Contents


NAME    [Toc]    [Back]

     vm_map_lock, vm_map_unlock, vm_map_lock_read, vm_map_unlock_read,
     vm_map_trylock, vm_map_trylock_read, vm_map_lock_upgrade,
     vm_map_lock_downgrade -- vm_map locking macros

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <vm/vm.h>
     #include <vm/vm_map.h>

     void
     vm_map_lock(vm_map_t map);

     void
     vm_map_unlock(vm_map_t map);

     void
     vm_map_lock_read(vm_map_t map);

     void
     vm_map_unlock_read(vm_map_t map);

     int
     vm_map_trylock(vm_map_t map);

     int
     vm_map_trylock_read(vm_map_t map);

     int
     vm_map_lock_upgrade(vm_map_t map);

     int
     vm_map_lock_downgrade(vm_map_t map);

DESCRIPTION    [Toc]    [Back]

     The vm_map_lock() macro obtains an exclusive lock on map.

     The vm_map_unlock() macro releases an exclusive lock on map.

     The vm_map_lock_read() macro obtains a read-lock on map.  Currently this
     is implemented as an exclusive lock.

     The vm_map_unlock_read() macro releases a read-lock on map.

     The vm_map_trylock() macro attempts to obtain an exclusive lock on map.
     It returns FALSE if the lock cannot be immediately acquired; otherwise
     return TRUE with the lock acquired.

     The vm_map_trylock_read() macro attempts to obtain a read-lock on map.
     It returns FALSE if the lock cannot be immediately acquired; otherwise
     return TRUE with the lock acquired.  Currently this is implemented as an
     exclusive lock.

     The vm_map_lock_upgrade() macro attempts to atomically upgrade a readlock
 on map to an exclusive lock.	As read-locks are currently implemented
 as exclusive locks, this macro is a no-op.

     The vm_map_lock_downgrade() macro attempts to downgrade an exclusive lock
     on map to a read-lock.  As read-locks are currently implemented as exclusive
 locks, this macro is a no-op.

IMPLEMENTATION NOTES    [Toc]    [Back]

     Currently, all of the locking macros implement their locks as sleep
     locks.

SEE ALSO    [Toc]    [Back]

      
      
     vm_map(9)

AUTHORS    [Toc]    [Back]

     This man page was written by Bruce M Simpson <bms@spc.org>.


				 July 19, 2003
[ Back ]
 Similar pages
Name OS Title
vm_map_create FreeBSD create a new vm_map structure
vm_map_check_protection FreeBSD check memory protection for a vm_map
vm_map_init FreeBSD initialize a vm_map structure for process zero
flockfile Tru64 locking functions
stdio Tru64 locking functions
ftrylockfilefunlockfile Tru64 locking functions
rpc.lockd OpenBSD NFS file locking daemon
VOP_ADVLOCK FreeBSD advisory record locking
rpc.lockd FreeBSD NFS file locking daemon
lockd FreeBSD NFS file locking daemon
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service