Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_unlock_global_np(3) [osf1 man page]

pthread_unlock_global_np(3)				     Library Functions Manual				       pthread_unlock_global_np(3)

NAME
pthread_unlock_global_np - Unlocks the DECthreads global mutex. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_unlock_global_np(void); STANDARDS
None PARAMETERS
None DESCRIPTION
This routine unlocks the DECthreads global mutex. Because the global mutex is recursive, the unlock occurs when each call to pthread_lock_global_np(3) has been matched by a call to this routine. For example, if you called pthread_lock_global_np(3) three times, pthread_unlock_global_np(3) unlocks the global mutex when you call it the third time. If no threads are waiting for the DECthreads global mutex, it becomes unlocked with no current owner. If one or more threads are waiting to lock the global mutex, this routine causes one thread to unblock and try to acquire the global mutex. The scheduling policy is used to determine which thread is awakened. For the policies SCHED_FIFO and SCHED_RR, a blocked thread is chosen in priority order, using first- in/first-out (FIFO) within priorities. 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 unlocked or owned by another thread. ERRORS
None RELATED INFORMATION
Functions: pthread_lock_global_np(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_unlock_global_np(3)

Check Out this Related Man Page

tis_lock_global(3)					     Library Functions Manual						tis_lock_global(3)

NAME
tis_lock_global - Locks the DECthreads global mutex. LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <tis.h> int tis_lock_global(void); STANDARDS
None PARAMETERS
None DESCRIPTION
This routine locks the DECthreads global mutex. The global mutex is recursive. For example, if you called tis_lock_global(3) three times, tis_unlock_global(3) unlocks the global mutex when you call it the third time. For more information about actions taken when threads are present, refer to the pthread_lock_global_np(3) description. 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. ERRORS
None RELATED INFORMATION
Functions: tis_unlock_global(3) Manuals: Guide to DECthreads and Programmer's Guide delim off tis_lock_global(3)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

Number of threads waiting on a pthread mutex/rwlock

Using pthreads is there a way to determine how many threads are waiting on a locked resource? I mean, once a shared resource is protected using e.g. pthread_rwlock_t or pthread_mutex_t one thread grabs the lock and other threads will go to sleep waiting for the resource to be available again. Is... (0 Replies)
Discussion started by: muggu
0 Replies

2. Programming

design query: where to lock mutex for function accessing global value?

Hi, Suppose I have a function that accesses and increments a global variable . This function is run as part of thread. One locks mutex in the function and unlocks it after the processing is done. Is there any alternative way? Thanks in advance. (1 Reply)
Discussion started by: sanjayc
1 Replies

3. Programming

pthread locking and unlocking.

When more than one thread is waiting for a locked mutex, which thread will be granted the lock first after it is released. In our application we want to implement FIFO thread scheduling policy i.e. Thread should get lock which one requested first for it. AIX have SCHED_FIFO thread scheduling... (1 Reply)
Discussion started by: mukind
1 Replies

4. Red Hat

GTK bug? xcb_io.c: 140

Hi all, Trying to get my application ready for distribution. All looking good until I started getting this error and program termination: My-Program: xcb_io.c:140 dequeue_pending_request: Assertion `req == dpy->xcb->pending_requests` failed Has anyone come accross this? I am working in... (7 Replies)
Discussion started by: fedora18
7 Replies