Page MenuHomeFreeBSD

libthr: add LoongArch support
Needs ReviewPublic

Authored by zhaoxiaoqiang007_gmail.com on Tue, Sep 22, 2:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 9, 6:15 PM
Unknown Object (File)
Fri, Oct 9, 2:57 AM
Unknown Object (File)
Tue, Oct 6, 10:59 PM
Unknown Object (File)
Tue, Oct 6, 3:34 PM
Unknown Object (File)
Tue, Oct 6, 12:50 AM
Unknown Object (File)
Sat, Oct 3, 9:07 PM
Unknown Object (File)
Sat, Oct 3, 6:50 PM
Unknown Object (File)
Fri, Oct 2, 2:53 PM

Details

Reviewers
jkoshy
kib
Summary

Add pthread_md.h TLS/TP glue and the libthread_db register mapping.

Signed-off-by: Xiaoqiang Zhao <zhaoxiaoqiang007@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77178
Build 74061: arc lint + arc unit

Event Timeline

shipujin.t_gmail.com added inline comments.
lib/libthr/arch/loongarch/include/pthread_md.h
38

CPU_SPINWAIT is used in spinlock loops to give the CPU a lightweight hint (such as x86's pause) to reduce power consumption and memory bus contention, but LoongArch has no equivalent instruction. Therefore, like RISC-V, AArch64, ARM, and PowerPC, this should define the macro as #define CPU_SPINWAIT rather than using a compiler memory barrier.

Suggested change to:

#define	CPU_SPINWAIT