yolobs-studio/deps/w32-pthreads/manual/pthread_condattr_init.html
2017-04-19 22:03:16 +02:00

98 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>PTHREAD_CONDATTR(3) manual page</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
<META NAME="CREATED" CONTENT="20050504;16375600">
<META NAME="CHANGED" CONTENT="20050504;16570300">
<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->
</HEAD>
<BODY LANG="en-GB" BGCOLOR="#ffffff" DIR="LTR">
<H4>POSIX Threads for Windows REFERENCE - <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
<P><A HREF="index.html">Reference Index</A></P>
<P><A HREF="#toc">Table of Contents</A></P>
<H2><A HREF="#toc0" NAME="sect0">Name</A></H2>
<P>pthread_condattr_init, pthread_condattr_destroy - condition
creation
</P>
<P>attributes
</P>
<H2><A HREF="#toc1" NAME="sect1">Synopsis</A></H2>
<P><B>#include &lt;pthread.h&gt;</B>
</P>
<P><B>int pthread_condattr_init(pthread_condattr_t *</B><I>attr</I><B>);</B>
</P>
<P><B>int pthread_condattr_destroy(pthread_condattr_t *</B><I>attr</I><B>);</B>
</P>
<H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
<P>Condition attributes can be specified at condition creation time,
by passing a condition attribute object as second argument to
<A HREF="pthread_cond_init.html"><B>pthread_cond_init</B>(3)</A> .
Passing <B>NULL</B> is equivalent to passing a condition attribute
object with all attributes set to their default values.
</P>
<P><B>pthread_condattr_init</B> initializes the condition attribute
object <I>attr</I> and fills it with default values for the
attributes. <B>pthread_condattr_destroy</B> destroys a condition
attribute object, which must not be reused until it is reinitialized.</P>
<P><B>Pthreads-w32</B> defines _<B>POSIX_THREAD_PROCESS_SHARED</B> in
pthread.h as -1 to indicate that the attribute routines are
implemented but that the process shared attribute is not supported.</P>
<H2><A HREF="#toc3" NAME="sect3">Return Value</A></H2>
<P>All condition variable functions return 0 on success and a
non-zero error code on error.</P>
<H2><A HREF="#toc4" NAME="sect4">Errors</A></H2>
<P>The <B>pthread_condattr_init</B> function returns the following
error code on error:
</P>
<DL>
<DL>
<DT STYLE="margin-right: 1cm; margin-bottom: 0.5cm"><B>ENOMEM</B>
</DT><DD STYLE="margin-right: 1cm; margin-bottom: 0.5cm">
The was insufficient memory to create the attribute.<SPAN STYLE="font-weight: medium">
</SPAN>
</DD></DL>
</DL>
<P>
The <B>pthread_condattr_destroy</B> function returns the following
error code on error:
</P>
<DL>
<DL>
<DT STYLE="margin-right: 1cm; margin-bottom: 0.5cm"><B>EINVAL</B>
</DT><DD STYLE="margin-right: 1cm; margin-bottom: 0.5cm">
The <I>attr</I> argument is not valid.<SPAN STYLE="font-weight: medium">
</SPAN>
</DD></DL>
</DL>
<H2>
<A HREF="#toc5" NAME="sect5">Author</A></H2>
<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt;
</P>
<P>Modified by Ross Johnson for use with <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A>.</P>
<H2><A HREF="#toc6" NAME="sect6">See Also</A></H2>
<P><A HREF="pthread_cond_init.html"><B>pthread_cond_init</B>(3)</A> .
</P>
<HR>
<P><A NAME="toc"></A><B>Table of Contents</B></P>
<UL>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect0" NAME="toc0">Name</A>
</P>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect1" NAME="toc1">Synopsis</A>
</P>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect2" NAME="toc2">Description</A>
</P>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect3" NAME="toc3">Return
Value</A>
</P>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect4" NAME="toc4">Errors</A>
</P>
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect5" NAME="toc5">Author</A>
</P>
<LI><P><A HREF="#sect6" NAME="toc6">See Also</A>
</P>
</UL>
</BODY>
</HTML>