diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2018-01-29 10:27:17 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2018-01-29 10:27:17 -0800 |
commit | d1c09b247130c1aedd11b913f579c7764b1b5ae1 (patch) | |
tree | f7b2eb5361ae69af3490074320178fb04f7e3fd7 /sysdeps/riscv/nptl/libc-lowlevellock.c | |
parent | b2cb5e0298e08b486190610a9e82356ccb6f564b (diff) | |
download | glibc-d1c09b247130c1aedd11b913f579c7764b1b5ae1.tar.gz glibc-d1c09b247130c1aedd11b913f579c7764b1b5ae1.tar.xz glibc-d1c09b247130c1aedd11b913f579c7764b1b5ae1.zip |
RISC-V: Atomic and Locking Routines
This patch implements various atomic and locking routines on RISC-V. We mandate the A extension on Linux-capable RISC-V systems, so this can rely on always having the various atomic instructions availiable. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/nptl/bits/pthreadtypes-arch.h: New file. * sysdeps/riscv/nptl/bits/semaphore.h: Likewise. * sysdeps/riscv/nptl/libc-lowlevellock.c: Likewise. * sysdeps/unix/sysv/linux/riscv/atomic-machine.h: Likewise.
Diffstat (limited to 'sysdeps/riscv/nptl/libc-lowlevellock.c')
-rw-r--r-- | sysdeps/riscv/nptl/libc-lowlevellock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/riscv/nptl/libc-lowlevellock.c b/sysdeps/riscv/nptl/libc-lowlevellock.c new file mode 100644 index 0000000000..9523fb46a5 --- /dev/null +++ b/sysdeps/riscv/nptl/libc-lowlevellock.c @@ -0,0 +1,8 @@ +/* This kludge works around a libpthread static linking problem: + https://sourceware.org/bugzilla/show_bug.cgi?id=15648. */ + +#ifndef SHARED +# define __lll_lock_wait_private weak_function __lll_lock_wait_private +#endif + +#include <lowlevellock.c> |