Commit | Line | Data |
---|---|---|
b32429a9 MD |
1 | /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ |
2 | /* | |
3 | * cpu-op.h | |
4 | * | |
5 | * (C) Copyright 2017-2018 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
6 | */ | |
7 | ||
8 | #ifndef RSEQ_CPU_OP_H | |
9 | #define RSEQ_CPU_OP_H | |
10 | ||
11 | #include <stdlib.h> | |
12 | #include <stdint.h> | |
13 | #include <linux/cpu_opv.h> | |
14 | ||
15 | int cpu_opv(struct cpu_op *cpuopv, int cpuopcnt, int cpu, int flags); | |
16 | int cpu_op_get_current_cpu(void); | |
52e82b87 | 17 | int cpu_op_available(void); |
b32429a9 MD |
18 | |
19 | int cpu_op_cmpxchg(void *v, void *expect, void *old, void *_new, size_t len, | |
20 | int cpu); | |
21 | int cpu_op_add(void *v, int64_t count, size_t len, int cpu); | |
22 | ||
23 | int cpu_op_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu); | |
24 | int cpu_op_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, | |
25 | off_t voffp, intptr_t *load, int cpu); | |
26 | int cpu_op_cmpeqv_storev_storev(intptr_t *v, intptr_t expect, | |
27 | intptr_t *v2, intptr_t newv2, | |
28 | intptr_t newv, int cpu); | |
29 | int cpu_op_cmpeqv_storev_mb_storev(intptr_t *v, intptr_t expect, | |
30 | intptr_t *v2, intptr_t newv2, | |
31 | intptr_t newv, int cpu); | |
32 | int cpu_op_cmpeqv_cmpeqv_storev(intptr_t *v, intptr_t expect, | |
33 | intptr_t *v2, intptr_t expect2, | |
34 | intptr_t newv, int cpu); | |
35 | int cpu_op_cmpeqv_memcpy_storev(intptr_t *v, intptr_t expect, | |
36 | void *dst, void *src, size_t len, | |
37 | intptr_t newv, int cpu); | |
38 | int cpu_op_cmpeqv_memcpy_mb_storev(intptr_t *v, intptr_t expect, | |
39 | void *dst, void *src, size_t len, | |
40 | intptr_t newv, int cpu); | |
41 | int cpu_op_addv(intptr_t *v, int64_t count, int cpu); | |
42 | ||
43 | #endif /* RSEQ_CPU_OP_H_ */ |