xref: /illumos-gate/usr/src/man/man3c/thrd_current.3c (revision 3ba944265c4ae1fcf23ef758537c2e4f4feec16e)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2016 Joyent, Inc.
13.\"
14.Dd "Jan 11, 2015"
15.Dt THRD_CURRENT 3C
16.Os
17.Sh NAME
18.Nm thrd_current
19.Nd obtain current thread's ID
20.Sh SYNOPSIS
21.In threads.h
22.Ft thrd_t
23.Fo thrd_current
24.Fa void
25.Fc
26.Sh DESCRIPTION
27The
28.Fn thrd_current
29function returns the thread ID of the current calling thread. Note, this
30ID may be different from the thread ID returned when using
31.Xr thr_self 3C
32or
33.Xr pthread_self 3C ;
34however, it still uniquely identifies the thread.
35.Sh ERRORS
36No errors are defined.
37.Sh INTERFACE STABILITY
38.Sy Standard
39.Sh MT-Level
40.Sy MT-Safe
41.Sh SEE ALSO
42.Xr pthread_self 3C ,
43.Xr thr_self 3C ,
44.Xr thrd_create 3C ,
45.Xr attributes 5 ,
46.Xr threads 5
47