Page MenuHomeFreeBSD

libthr: add LoongArch support
Needs ReviewPublic

Authored by zhaoxiaoqiang007_gmail.com on Tue, Sep 22, 2:25 PM.
Tags
None
Referenced Files
F173388972: D59898.diff
Fri, Sep 25, 3:38 PM
Unknown Object (File)
Thu, Sep 24, 2:24 PM
Unknown Object (File)
Thu, Sep 24, 1:51 PM
Unknown Object (File)
Thu, Sep 24, 11:32 AM
Unknown Object (File)
Wed, Sep 23, 8:41 AM
Unknown Object (File)
Wed, Sep 23, 1:47 AM
Unknown Object (File)
Tue, Sep 22, 11:54 PM
Unknown Object (File)
Tue, Sep 22, 10:06 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