From dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31 Mon Sep 17 00:00:00 2001 From: Érico Nogueira Date: Thu, 10 Sep 2020 03:42:03 -0300 Subject: pthread: add __sched_{cpualloc,cpufree}. Implemented using the CPU_{ALLOC,FREE} macros. These symbols are required by nvidia 450.57 binaries. --- libgcompat/pthread.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libgcompat/pthread.c') diff --git a/libgcompat/pthread.c b/libgcompat/pthread.c index 4357d74..19adceb 100644 --- a/libgcompat/pthread.c +++ b/libgcompat/pthread.c @@ -2,7 +2,7 @@ #include /* errno */ #include /* O_CLOEXEC, O_RDONLY */ #include /* pthread_atfork */ -#include /* sched_yield */ +#include /* sched_yield, CPU_ALLOC, CPU_FREE */ #include /* open, read */ #include "alias.h" /* weak_alias */ @@ -61,3 +61,19 @@ int pthread_yield(void) { return sched_yield(); } + +/** + * Allocate a large enough CPU set + */ +cpu_set_t *__sched_cpualloc(size_t _count) +{ + return CPU_ALLOC(__count); +} + +/** + * Free a CPU set allocated by __sched_cpualloc + */ +void __sched_cpufree(cpu_set_t *__set) +{ + return CPU_FREE(__set); +} -- cgit v1.2.3-60-g2f50