xref: /haiku/headers/compatibility/gnu/pthread.h (revision c5a740cdb23a6dc9973a8142303b67f830c67b54)
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 
15*c5a740cdSJérôme Duval #include <sched.h>
16*c5a740cdSJérôme Duval 
17*c5a740cdSJé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*c5a740cdSJérôme Duval extern int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpuset_t* mask);
29*c5a740cdSJérôme Duval extern int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpuset_t* mask);
30*c5a740cdSJérôme Duval 
31ba56d0a5SJérôme Duval 
32ba56d0a5SJérôme Duval #ifdef __cplusplus
33ba56d0a5SJérôme Duval }
34ba56d0a5SJérôme Duval #endif
35ba56d0a5SJérôme Duval 
36ba56d0a5SJérôme Duval 
37ba56d0a5SJérôme Duval #endif
38ba56d0a5SJérôme Duval 
39ba56d0a5SJérôme Duval 
40ba56d0a5SJérôme Duval #endif	/* _GNU_PTHREAD_H_ */
41ba56d0a5SJérôme Duval 
42