haiku/headers/compatibility/gnu/sched.h
Jérôme Duval efbeada748 gnu: add sched_getcpu()
on x86_64 implemented with rdtscp or rdpid, generically with a syscall.

Change-Id: I8f776848bf35575abec8a8c612c4a25d8550daea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6866
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-21 17:55:16 +00:00

30 lines
338 B
C

/*
* Copyright 2023 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _GNU_SCHED_H_
#define _GNU_SCHED_H_
#include_next <sched.h>
#ifdef _GNU_SOURCE
#ifdef __cplusplus
extern "C" {
#endif
extern int sched_getcpu(void);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _GNU_SCHED_H_ */