mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 20:48:48 +01:00
90dca2bc8e
We automatically enable _DEFAULT_SOURCE if _GNU_SOURCE is defined. Rather than having even more optional methods undefined unless _GNU_SOURCE manually is, just change all remaining guarts to use _DEFAULT_SOURCE instead. Fixes #19095. Change-Id: I5c7baf40b7fb37913e24279589fc1ae706448a45 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8330 Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
48 lines
922 B
C
48 lines
922 B
C
/*
|
|
* Copyright 2019 Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _GNU_PTHREAD_H_
|
|
#define _GNU_PTHREAD_H_
|
|
|
|
|
|
#include_next <pthread.h>
|
|
#include <features.h>
|
|
|
|
|
|
#ifdef _DEFAULT_SOURCE
|
|
|
|
|
|
#include <sched.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#define PTHREAD_MAX_NAMELEN_NP 32 // B_OS_NAME_LENGTH
|
|
|
|
|
|
extern int pthread_getattr_np(pthread_t thread, pthread_attr_t* attr);
|
|
|
|
extern int pthread_getname_np(pthread_t thread, char* buffer, size_t length);
|
|
extern int pthread_setname_np(pthread_t thread, const char* name);
|
|
|
|
extern int pthread_timedjoin_np(pthread_t thread, void** _value, const struct timespec* abstime);
|
|
|
|
extern int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpuset_t* mask);
|
|
extern int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpuset_t* mask);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif /* _GNU_PTHREAD_H_ */
|
|
|