fix: add missing SPDX licensing tags
[urcu.git] / include / urcu / arch / sparc64.h
CommitLineData
d3d3857f
MJ
1// SPDX-FileCopyrightText: 2009 Paul E. McKenney, IBM Corporation.
2// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
58de5a4b
MD
6#ifndef _URCU_ARCH_SPARC64_H
7#define _URCU_ARCH_SPARC64_H
8
9/*
10 * arch_sparc64.h: trivial definitions for the Sparc64 architecture.
58de5a4b
MD
11 */
12
13#include <urcu/compiler.h>
14#include <urcu/config.h>
999991c6 15#include <urcu/syscall-compat.h>
58de5a4b 16
36bc70a8
MD
17#ifdef __cplusplus
18extern "C" {
67ecffc0 19#endif
36bc70a8 20
994d4955
MD
21/*
22 * On Linux, define the membarrier system call number if not yet available in
23 * the system headers.
24 */
25#if (defined(__linux__) && !defined(__NR_membarrier))
26#define __NR_membarrier 351
27#endif
28
06f22bdb 29#define CAA_CACHE_LINE_SIZE 256
58de5a4b 30
58de5a4b
MD
31/*
32 * Inspired from the Linux kernel. Workaround Spitfire bug #51.
33 */
34#define membar_safe(type) \
35__asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
36 "membar " type "\n" \
37 "1:\n" \
38 : : : "memory")
39
5481ddb3
DG
40#define cmm_mb() membar_safe("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad")
41#define cmm_rmb() membar_safe("#LoadLoad")
42#define cmm_wmb() membar_safe("#StoreStore")
58de5a4b 43
67ecffc0 44#ifdef __cplusplus
36bc70a8
MD
45}
46#endif
47
1b9119f8 48#include <urcu/arch/generic.h>
e4d1eb09 49
58de5a4b 50#endif /* _URCU_ARCH_SPARC64_H */
This page took 0.049688 seconds and 4 git commands to generate.