Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_mutex_init(3-thr) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pthread_mutex_init(3-thr)                         pthread_mutex_init(3-thr)

NAME
     pthreadmutexinit - creates a mutex

SYNOPSIS
     #include <pthread.h>

     int pthreadmutexinit(
          pthreadmutext *mutex,
          pthreadmutexattrt attr);

PARAMETERS
     mutex     Mutex that is created.

     attr      Attributes object that defines the characteristics of the
               created mutex. If you specify pthreadmutexattrdefault,
               default attributes are used.

DESCRIPTION
     The pthreadmutexinit() routine creates a mutex and initializes it to
     the unlocked state. If the thread that called this routine terminates,
     the created mutex is not automatically deallocated, because it is con-
     sidered shared among multiple threads.

RETURN VALUES
     If an error condition occurs, this routine returns -1, the mutex is
     not initialized, the contents of mutex are undefined, and errno may be
     set to one of the following values:

     EAGAIN    The system lacks the necessary resources to initialize
               another mutex.

     EINVAL    The value specified by attr is invalid.

     ENOMEM    Insufficient memory exists to initialize the mutex.

SEE ALSO
     pthreadmutexlock(3-thr), pthreadmutextrylock(3-thr),
     pthreadmutexunlock(3-thr), pthreadmutexattrcreate(3-thr),
     pthreadmutexattrgetkindnp(3-thr),
     pthreadmutexattrsetkindnp(3-thr).















Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026