1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
5
<TITLE>PTHREAD_SELF(3) manual page</TITLE>
6
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
7
<META NAME="CREATED" CONTENT="20050505;11361600">
8
<META NAME="CHANGED" CONTENT="20050505;11575700">
9
<!-- manual page source format generated by PolyglotMan v3.2, -->
10
<!-- available at http://polyglotman.sourceforge.net/ -->
12
<BODY LANG="en-GB" BGCOLOR="#ffffff" DIR="LTR">
13
<H4>POSIX Threads for Windows – REFERENCE - <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
14
<P><A HREF="index.html">Reference Index</A></P>
15
<P><A HREF="#toc">Table of Contents</A></P>
16
<H2><A HREF="#toc0" NAME="sect0">Name</A></H2>
17
<P>pthread_self - return identifier of current thread
19
<H2><A HREF="#toc1" NAME="sect1">Synopsis</A></H2>
20
<P><B>#include <pthread.h></B>
22
<P><B>pthread_t pthread_self(void);</B>
24
<H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
25
<P><B>pthread_self</B> return the thread identifier for the calling
28
<P><B>Pthreads-w32</B> also provides support for <B>Win32</B> native
29
threads to interact with POSIX threads through the pthreads API.
30
Whereas all threads created via a call to pthread_create have a POSIX
31
thread ID and thread state, the library ensures that any Win32 native
32
threads that interact through the Pthreads API also generate a POSIX
33
thread ID and thread state when and if necessary. This provides full
34
<SPAN LANG="en-GB">reciprocity</SPAN> between Win32 and POSIX
35
threads. Win32 native threads that generate a POSIX thread ID and
36
state are treated by the library as having been created with the
37
<B>PTHREAD_CREATE_DETACHED</B> attribute.</P>
38
<P>Any Win32 native thread may call <B>pthread_self</B> directly to
39
return it's POSIX thread identifier. The ID and state will be
40
generated if it does not already exist. Win32 native threads do not
41
need to call <B>pthread_self</B> before calling Pthreads-w32 routines
42
unless that routine requires a pthread_t parameter.</P>
43
<H2><A HREF="#toc3" NAME="sect3">Author</A></H2>
44
<P>Xavier Leroy <Xavier.Leroy@inria.fr>
46
<P>Modified by Ross Johnson for use with <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A>.</P>
47
<H2><A HREF="#toc4" NAME="sect4">See Also</A></H2>
48
<P><A HREF="pthread_equal.html"><B>pthread_equal</B>(3)</A> ,
49
<A HREF="pthread_join.html"><B>pthread_join</B>(3)</A> ,
50
<A HREF="pthread_detach.html"><B>pthread_detach</B>(3)</A> ,
51
<A HREF="pthread_setschedparam.html"><B>pthread_setschedparam</B>(3)</A>
52
, <A HREF="pthread_setschedparam.html"><B>pthread_getschedparam</B>(3)</A>
56
<P><A NAME="toc"></A><B>Table of Contents</B></P>
58
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect0" NAME="toc0">Name</A>
60
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect1" NAME="toc1">Synopsis</A>
62
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect2" NAME="toc2">Description</A>
64
<LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect3" NAME="toc3">Author</A>
66
<LI><P><A HREF="#sect4" NAME="toc4">See Also</A>