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