mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 21:11:28 +01:00
9a4c543934
This also corrects an oversight in pthread_join() that not all potential error codes of wait_for_thread were accounted for (in particular EDEADLK wasn't.) This is a non-standard extension, but is present on both Linux and FreeBSD, at least. Change-Id: Ie96e7a261e863ab491bee30349360df7ff3d0e80 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5099 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
44 lines
861 B
C
44 lines
861 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 _GNU_SOURCE
|
|
|
|
|
|
#include <sched.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
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_ */
|
|
|