summaryrefslogtreecommitdiff
path: root/static/freebsd/man3/pthread_setspecific.3 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man3/pthread_setspecific.3 3.html')
-rw-r--r--static/freebsd/man3/pthread_setspecific.3 3.html91
1 files changed, 91 insertions, 0 deletions
diff --git a/static/freebsd/man3/pthread_setspecific.3 3.html b/static/freebsd/man3/pthread_setspecific.3 3.html
new file mode 100644
index 00000000..770dfe59
--- /dev/null
+++ b/static/freebsd/man3/pthread_setspecific.3 3.html
@@ -0,0 +1,91 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">PTHREAD_SETSPECIFIC(3)</td>
+ <td class="head-vol">Library Functions Manual</td>
+ <td class="head-rtitle">PTHREAD_SETSPECIFIC(3)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">pthread_setspecific</code> &#x2014;
+ <span class="Nd">set a thread-specific data value</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
+<p class="Pp"><span class="Lb">POSIX Threads Library (libpthread,
+ -lpthread)</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="In">#include
+ &lt;<a class="In">pthread.h</a>&gt;</code></p>
+<p class="Pp"><var class="Ft">int</var>
+ <br/>
+ <code class="Fn">pthread_setspecific</code>(<var class="Fa" style="white-space: nowrap;">pthread_key_t
+ key</var>, <var class="Fa" style="white-space: nowrap;">const void
+ *value</var>);</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The
+ <a class="permalink" href="#pthread_setspecific"><code class="Fn" id="pthread_setspecific">pthread_setspecific</code></a>()
+ function associates a thread-specific value with a <var class="Fa">key</var>
+ obtained via a previous call to
+ <a class="permalink" href="#pthread_key_create"><code class="Fn" id="pthread_key_create">pthread_key_create</code></a>().
+ Different threads can bind different values to the same key. These values
+ are typically pointers to blocks of dynamically allocated memory that have
+ been reserved for use by the calling thread.</p>
+<p class="Pp" id="pthread_setspecific~2">The effect of calling
+ <a class="permalink" href="#pthread_setspecific~2"><code class="Fn">pthread_setspecific</code></a>()
+ with a key value not obtained from
+ <a class="permalink" href="#pthread_key_create~2"><code class="Fn" id="pthread_key_create~2">pthread_key_create</code></a>()
+ or after <var class="Fa">key</var> has been deleted with
+ <a class="permalink" href="#pthread_key_delete"><code class="Fn" id="pthread_key_delete">pthread_key_delete</code></a>()
+ is undefined.</p>
+<p class="Pp" id="pthread_setspecific~3">The
+ <a class="permalink" href="#pthread_setspecific~3"><code class="Fn">pthread_setspecific</code></a>()
+ function may be called from a thread-specific data destructor function,
+ however this may result in lost storage or infinite loops if doing so causes
+ non-NULL key values to remain after [PTHREAD_DESTRUCTOR_ITERATIONS]
+ iterations of destructor calls have been made.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
+ VALUES</a></h1>
+<p class="Pp">If successful, the <code class="Fn">pthread_setspecific</code>()
+ function will return zero. Otherwise an error number will be returned to
+ indicate the error.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
+<p class="Pp">The <code class="Fn">pthread_setspecific</code>() function will
+ fail if:</p>
+<dl class="Bl-tag">
+ <dt id="ENOMEM">[<a class="permalink" href="#ENOMEM"><code class="Er">ENOMEM</code></a>]</dt>
+ <dd>Insufficient memory exists to associate the value with the
+ <var class="Fa">key</var>.</dd>
+ <dt id="EINVAL">[<a class="permalink" href="#EINVAL"><code class="Er">EINVAL</code></a>]</dt>
+ <dd>The <var class="Fa">key</var> value is invalid.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">pthread_getspecific(3)</a>,
+ <a class="Xr">pthread_key_create(3)</a>,
+ <a class="Xr">pthread_key_delete(3)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="STANDARDS"><a class="permalink" href="#STANDARDS">STANDARDS</a></h1>
+<p class="Pp">The <code class="Fn">pthread_setspecific</code>() function
+ conforms to <span class="St">ISO/IEC 9945-1:1996
+ (&#x201C;POSIX.1&#x201D;)</span>.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">April 4, 1996</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>