VMS Help
POSIX Threads, PTHREAD routines, pthread_unlock_global_np

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Unlocks the Threads Library global mutex.

  1 - C Binding

    #include <pthread.h>

    int
    pthread_unlock_global_np (void);

  2 - Arguments

    None

  3 - Description

    This routine unlocks the Threads Library global mutex. Because
    the global mutex is recursive, the unlock occurs when each call
    to pthread_lock_global_np() has been matched by a call to this
    routine. For example, if you called pthread_lock_global_np()
    three times, pthread_unlock_global_np() unlocks the global mutex
    when you call it the third time.

    If no threads are waiting for the 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 to try to acquire the global mutex. The scheduling
    policy is used by this routine 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.

  4 - Return Values

    If an error condition occurs, this routine returns an integer
    value indicating the type of error. Possible return values are as
    follows:

    Return      Description

    0           Successful completion.
    [EPERM]     The mutex is unlocked or owned by another thread.

  5 - Associated Routines

       pthread_lock_global_np()
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.