diff options
author | David S. Miller <davem@davemloft.net> | 2012-10-28 23:19:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-28 23:19:00 -0700 |
commit | 19f1dd5f2dbf794cd6b040093bf2b1ba114b3c15 (patch) | |
tree | 4e074ca1aa80f6db0c1ab23526d10bcdfac7d15a /nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h | |
parent | 86ebe6b1334510d5e71fa1b0f686359bd655d6c5 (diff) | |
download | glibc-19f1dd5f2dbf794cd6b040093bf2b1ba114b3c15.tar.gz glibc-19f1dd5f2dbf794cd6b040093bf2b1ba114b3c15.tar.xz glibc-19f1dd5f2dbf794cd6b040093bf2b1ba114b3c15.zip |
Define a BUSY_WAIT_NOP for sparc.
nptl/ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP): Define when we have v9 instructions available. * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax to libpthread-routines.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h index fafb0873f8..e0495622a3 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h @@ -50,6 +50,11 @@ #define LLL_PRIVATE 0 #define LLL_SHARED FUTEX_PRIVATE_FLAG +#ifndef __sparc32_atomic_do_lock +/* Delay in spinlock loop. */ +extern void __cpu_relax(void); +#define BUSY_WAIT_NOP __cpu_relax() +#endif #if !defined NOT_IN_libc || defined IS_IN_rtld /* In libc.so or ld.so all futexes are private. */ |