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 <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
449929ad0e
commit
efbeada748
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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_ */
|
||||
Reference in New Issue
Block a user