diff options
author | Christoph Müllner <christoph.muellner@vrull.eu> | 2024-04-18 23:58:58 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2024-06-24 21:36:49 +0200 |
commit | 81c7f6193ce66480b2a29a5b2c66a7356e743308 (patch) | |
tree | a4337e4852e0a1042250783985cb2fe5f720fd2c /sysdeps/unix/sysv/linux/tcgetpgrp.c | |
parent | 9e06e4a43b58519991acbed1d7f33abc40249226 (diff) | |
download | glibc-81c7f6193ce66480b2a29a5b2c66a7356e743308.tar.gz glibc-81c7f6193ce66480b2a29a5b2c66a7356e743308.tar.xz glibc-81c7f6193ce66480b2a29a5b2c66a7356e743308.zip |
RISC-V: Execute a PAUSE hint in spin loops
The atomic_spin_nop() macro can be used to run arch-specific code in the body of a spin loop to potentially improve efficiency. RISC-V's Zihintpause extension includes a PAUSE instruction for this use-case, which is encoded as a HINT, which means that it behaves like a NOP on systems that don't implement Zihintpause. Binutils supports Zihintpause since 2.36, so this patch uses the ".insn" directive to keep the code compatible with older toolchains. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/tcgetpgrp.c')
0 files changed, 0 insertions, 0 deletions