pthread_mutex_trylock man page on Tru64

Printed from http://www.polarhome.com/service/man/?qf=pthread_mutex_trylock&af=0&tf=2&of=Tru64

pthread_mutex_trylock(3)			      pthread_mutex_trylock(3)

NAME
       pthread_mutex_trylock  -	 Attempts to lock the specified mutex, without
       waiting if already locked

SYNOPSIS
       #include <pthread.h>

       int pthread_mutex_trylock(
	       pthread_mutex_t *mutex );

LIBRARY
       DECthreads POSIX 1003.1c Library (libpthread.so)

STANDARDS
       Interfaces documented on this reference page conform to industry	 stan‐
       dards as follows:

       IEEE Std 1003.1c-1995, POSIX System Application Program Interface

PARAMETERS
       Mutex to be locked.

DESCRIPTION
       This  routine  attempts	to lock the mutex specified in the mutex argu‐
       ment. When a thread calls this routine, an attempt is made  to  immedi‐
       ately lock the mutex. If the mutex is successfully locked, this routine
       returns zero (0) and the calling thread	becomes	 the  mutex's  current
       owner.  If  the specified mutex is locked when a thread calls this rou‐
       tine, the calling thread does not wait for the mutex to	become	avail‐
       able.

       The  behavior  of this routine is as follows: For a normal, default, or
       errorcheck mutex: if the mutex is locked by any thread  (including  the
       calling	thread)	 when  this  routine  is  called, this routine returns
       [EBUSY] and the calling thread does not wait to acquire the lock.   For
       a  normal  or errorcheck mutex: if the mutex is not owned, this routine
       returns zero (0) and the mutex becomes locked by	 the  calling  thread.
       For  a  recursive  mutex:  if the mutex is owned by the calling thread,
       this routine returns zero (0) and the mutex lock count is  incremented.
       (To  unlock  a  recursive  mutex, each call to pthread_mutex_trylock(3)
       must be matched by a call to pthread_mutex_unlock(3).)

       Use the pthread_mutexattr_settype(3) routine  to	 set  the  mutex  type
       attribute (normal, default, recursive, or errorcheck).

RETURN VALUES
       If  an  error  condition	 occurs, this routine returns an integer value
       indicating the type of error. Possible return values  are  as  follows:
       Successful  completion.	The mutex is already locked; therefore, it was
       not acquired.  The value specified by mutex is not a valid mutex.

ERRORS
       None

SEE ALSO
       Functions:   pthread_mutexattr_settype(3),    pthread_mutex_destroy(3),
       pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3)

       Manuals: Guide to DECthreads and Programmer's Guide

						      pthread_mutex_trylock(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net