~lttng/urcu/trunk

« back to all changes in this revision

Viewing changes to include/urcu/arch.h

  • Committer: Mathieu Desnoyers
  • Author(s): Wang Jing
  • Date: 2023-09-06 13:20:24 UTC
  • Revision ID: git-v1:dc46a9c324ae94d89da41ea9a3f97503115df88e
Add LoongArch support

This commit completes LoongArch support.

LoongArch supports byte and short atomic operations,
and defines UATOMIC_HAS_ATOMIC_BYTE and UATOMIC_HAS_ATOMIC_SHORT.

Signed-off-by: Wang Jing <wangjing@loongson.cn>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I335e654939bfc90994275f2a4fad550c95f3eba4

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 * URCU_ARCH_HPPA : All HP PA-RISC variants
34
34
 * URCU_ARCH_M68K : All Motorola 68000 variants
35
35
 * URCU_ARCH_RISCV : All RISC-V variants
 
36
 * URCU_ARCH_LOONGARCH : All LoongArch variants
36
37
 */
37
38
 
38
39
#if (defined(__INTEL_OFFLOAD) || defined(__TARGET_ARCH_MIC) || defined(__MIC__))
151
152
#define URCU_ARCH_RISCV 1
152
153
#include <urcu/arch/riscv.h>
153
154
 
 
155
#elif defined(__loongarch__)
 
156
 
 
157
#define URCU_ARCH_LOONGARCH 1
 
158
#include <urcu/arch/loongarch.h>
 
159
 
154
160
#else
155
161
#error "Cannot build: unrecognized architecture, see <urcu/arch.h>."
156
162
#endif