1 .\" Copyright (c) 2016 Apple Inc. All rights reserved.
3 .\" @APPLE_LICENSE_HEADER_START@
5 .\" This file contains Original Code and/or Modifications of Original Code
6 .\" as defined in and that are subject to the Apple Public Source License
7 .\" Version 2.0 (the 'License'). You may not use this file except in
8 .\" compliance with the License. Please obtain a copy of the License at
9 .\" http://www.opensource.apple.com/apsl/ and read it before using this
12 .\" The Original Code and all software distributed under the License are
13 .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17 .\" Please see the License for the specific language governing rights and
18 .\" limitations under the License.
20 .\" @APPLE_LICENSE_HEADER_END@
23 .Dt PTHREAD_THREADID_NP 3
26 .Nm pthread_threadid_np
27 .Nd get the calling thread's unique ID
31 .Fn pthread_threadid_np "pthread_t thread" "uint64_t *thread_id"
34 .Fn pthread_threadid_np
35 function stores the system-wide unique integral ID of
37 in the location spedified by
41 is NULL, the ID of the current thread is provided.
44 .Fn pthread_threadid_np
45 function will return zero. Otherwise an error number will be returned to
49 .Fn pthread_threadid_np
50 function will fail if: