xref: /haiku/headers/compatibility/gnu/pthread.h (revision 13581b3d2a71545960b98fefebc5225b5bf29072)
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_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpuset_t* mask);
29 extern int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpuset_t* mask);
30 
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 
37 #endif
38 
39 
40 #endif	/* _GNU_PTHREAD_H_ */
41 
42