diff options
author | Érico Nogueira <ericonr@disroot.org> | 2020-09-10 03:42:03 -0300 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-09-27 01:56:03 -0500 |
commit | dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31 (patch) | |
tree | 8179b4099fb2c754a630de4d87df950d97b82d3a | |
parent | 0acb5e87d0b6baade234da2f01701003b65f5dda (diff) | |
download | gcompat-dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31.tar.gz gcompat-dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31.tar.bz2 gcompat-dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31.tar.xz gcompat-dd6bebf69dbe772e8374f1bbcc8f68f8c8421f31.zip |
pthread: add __sched_{cpualloc,cpufree}.
Implemented using the CPU_{ALLOC,FREE} macros.
These symbols are required by nvidia 450.57 binaries.
-rw-r--r-- | libgcompat/pthread.c | 18 |
1 files changed, 17 insertions, 1 deletions
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.h> /* errno */ #include <fcntl.h> /* O_CLOEXEC, O_RDONLY */ #include <pthread.h> /* pthread_atfork */ -#include <sched.h> /* sched_yield */ +#include <sched.h> /* sched_yield, CPU_ALLOC, CPU_FREE */ #include <unistd.h> /* 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); +} |