xref: /haiku/headers/compatibility/gnu/pthread.h (revision caed67a8cba83913b9c21ac2b06ebc6bd1cb3111)
1 /*
2  * Copyright 2019 Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _GNU_PTHREAD_H_
6 #define _GNU_PTHREAD_H_
7 
8 
9 #include_next <pthread.h>
10 #include <features.h>
11 
12 #ifdef _GNU_SOURCE
13 
14 
15 #include <sched.h>
16 
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 
23 extern int pthread_getattr_np(pthread_t thread, pthread_attr_t* attr);
24 
25 extern int pthread_getname_np(pthread_t thread, char* buffer, size_t length);
26 extern int pthread_setname_np(pthread_t thread, const char* name);
27 
28 extern int pthread_timedjoin_np(pthread_t thread, void** _value, const struct timespec* abstime);
29 
30 extern int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpuset_t* mask);
31 extern int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpuset_t* mask);
32 
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 
38 
39 #endif
40 
41 
42 #endif	/* _GNU_PTHREAD_H_ */
43 
44