glibc/linuxthreads/man/pthread_mutexattr_init.man
Ulrich Drepper 6736e93bab Update.
2002-03-23  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/brk.c (__curbrk): Declare.
	* sysdeps/generic/dl-brk.c: Add attribute_hidden to __curbrk.
	* sysdeps/generic/dl-sbrk.c: Likewise.
	* sysdeps/unix/arm/dl-brk.S: New file.
	* sysdeps/unix/bsd/hp/m68k/dl-brk.S: New file.
	* sysdeps/unix/bsd/osf/alpha/dl-brk.S: New file.
	* sysdeps/unix/bsd/sun/m68k/dl-brk.S: New file.
	* sysdeps/unix/bsd/vax/dl-brk.S: New file.
	* sysdeps/unix/i386/dl-brk.S: New file.
	* sysdeps/unix/mips/dl-brk.S: New file.
	* sysdeps/unix/sparc/dl-brk.S: New file.
	* sysdeps/unix/sysv/linux/alpha/dl-brk.S: New file.
	* sysdeps/unix/sysv/linux/ia64/dl-brk.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/dl-brk.S: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S: New file.
	* sysdeps/unix/sysv/linux/i386/dl-brk.c: Remove.
	* sysdeps/unix/sysv/linux/i386/dl-sbrk.c: Remove.

2002-04-03  Andreas Schwab  <schwab@suse.de>

	* Makefile (headers): Add gnu/lib-names.h here instead of
	install-others.
	($(inst_includedir)/gnu/lib-names.h): Remove explicit
	installation rule.
	(install-headers): Add dependency on install-headers-nosubdir.
	* stdio-common/Makefile (headers): Add bits/stdio_lim.h here
	instead of install-others.
	($(inst_includedir)/bits/stdio_lim.h): Remove explicit
	installation rule.

2002-04-05  Ulrich Drepper  <drepper@redhat.com>

	* manual/users.tex (Enable/Disable Setuid): Fix typo in example.
	Reported by Sam Roberts <sroberts@uniserve.com>.

2002-04-03  Jakub Jelinek  <jakub@redhat.com>

	* elf/do-rel.h (elf_dynamic_do_rel): Skip relative relocs if
	l_addr == 0 and ELF_MACHINE_REL_RELATIVE.
	* sysdeps/alpha/dl-machine.h (ELF_MACHINE_REL_RELATIVE): Define.
	* sysdeps/ia64/dl-machine.h (ELF_MACHINE_REL_RELATIVE): Define.

2002-04-03  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind info.
	(RTLD_START): Ditto.
	(__ia64_init_bootstrap_fdesc_table): Insert stop bit to avoid RAW
	dependency violation.
2002-04-06 01:45:15 +00:00

85 lines
3.0 KiB
Groff

.TH PTHREAD_MUTEXATTR 3 LinuxThreads
.XREF pthread_mutexattr_destroy
.XREF pthread_mutexattr_settype
.XREF pthread_mutexattr_gettype
.SH NAME
pthread_mutexattr_init, pthread_mutexattr_destroy, pthread_mutexattr_settype, pthread_mutexattr_gettype \- mutex creation attributes
.SH SYNOPSIS
#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind);
int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind);
.SH DESCRIPTION
Mutex attributes can be specified at mutex creation time, by passing a
mutex attribute object as second argument to !pthread_mutex_init!(3).
Passing !NULL! is equivalent to passing a mutex attribute object with
all attributes set to their default values.
!pthread_mutexattr_init! initializes the mutex attribute object |attr|
and fills it with default values for the attributes.
!pthread_mutexattr_destroy! destroys a mutex attribute object, which
must not be reused until it is reinitialized. !pthread_mutexattr_destroy!
does nothing in the LinuxThreads implementation.
LinuxThreads supports only one mutex attribute: the mutex kind, which
is either !PTHREAD_MUTEX_FAST_NP! for ``fast'' mutexes,
!PTHREAD_MUTEX_RECURSIVE_NP! for ``recursive'' mutexes,
or !PTHREAD_MUTEX_ERRORCHECK_NP! for ``error checking'' mutexes.
As the !NP! suffix indicates, this is a non-portable extension to the
POSIX standard and should not be employed in portable programs.
The mutex kind determines what happens if a thread attempts to lock a
mutex it already owns with !pthread_mutex_lock!(3). If the mutex is of
the ``fast'' kind, !pthread_mutex_lock!(3) simply suspends the calling
thread forever. If the mutex is of the ``error checking'' kind,
!pthread_mutex_lock!(3) returns immediately with the error code
!EDEADLK!. If the mutex is of the ``recursive'' kind, the call to
!pthread_mutex_lock!(3) returns immediately with a success return
code. The number of times the thread owning the mutex has locked it is
recorded in the mutex. The owning thread must call
!pthread_mutex_unlock!(3) the same number of times before the mutex
returns to the unlocked state.
The default mutex kind is ``fast'', that is, !PTHREAD_MUTEX_FAST_NP!.
!pthread_mutexattr_settype! sets the mutex kind attribute in |attr|
to the value specified by |kind|.
!pthread_mutexattr_gettype! retrieves the current value of the
mutex kind attribute in |attr| and stores it in the location pointed
to by |kind|.
.SH "RETURN VALUE"
!pthread_mutexattr_init!, !pthread_mutexattr_destroy! and
!pthread_mutexattr_gettype! always return 0.
!pthread_mutexattr_settype! returns 0 on success and a non-zero
error code on error.
.SH ERRORS
On error, !pthread_mutexattr_settype! returns the following error code:
.TP
!EINVAL!
|kind| is neither !PTHREAD_MUTEX_FAST_NP! nor !PTHREAD_MUTEX_RECURSIVE_NP!
nor !PTHREAD_MUTEX_ERRORCHECK_NP!
.SH AUTHOR
Xavier Leroy <Xavier.Leroy@inria.fr>
.SH "SEE ALSO"
!pthread_mutex_init!(3),
!pthread_mutex_lock!(3),
!pthread_mutex_unlock!(3).