1 // SPDX-License-Identifier: GPL-2.0
3 // Generated by scripts/atomic/gen-atomic-long.sh
4 // DO NOT MODIFY THIS FILE DIRECTLY
6 #ifndef _ASM_GENERIC_ATOMIC_LONG_H
7 #define _ASM_GENERIC_ATOMIC_LONG_H
12 typedef atomic64_t atomic_long_t;
13 #define ATOMIC_LONG_INIT(i) ATOMIC64_INIT(i)
14 #define atomic_long_cond_read_acquire atomic64_cond_read_acquire
15 #define atomic_long_cond_read_relaxed atomic64_cond_read_relaxed
17 typedef atomic_t atomic_long_t;
18 #define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i)
19 #define atomic_long_cond_read_acquire atomic_cond_read_acquire
20 #define atomic_long_cond_read_relaxed atomic_cond_read_relaxed
26 atomic_long_read(const atomic_long_t *v)
28 return atomic64_read(v);
32 atomic_long_read_acquire(const atomic_long_t *v)
34 return atomic64_read_acquire(v);
38 atomic_long_set(atomic_long_t *v, long i)
44 atomic_long_set_release(atomic_long_t *v, long i)
46 atomic64_set_release(v, i);
50 atomic_long_add(long i, atomic_long_t *v)
56 atomic_long_add_return(long i, atomic_long_t *v)
58 return atomic64_add_return(i, v);
62 atomic_long_add_return_acquire(long i, atomic_long_t *v)
64 return atomic64_add_return_acquire(i, v);
68 atomic_long_add_return_release(long i, atomic_long_t *v)
70 return atomic64_add_return_release(i, v);
74 atomic_long_add_return_relaxed(long i, atomic_long_t *v)
76 return atomic64_add_return_relaxed(i, v);
80 atomic_long_fetch_add(long i, atomic_long_t *v)
82 return atomic64_fetch_add(i, v);
86 atomic_long_fetch_add_acquire(long i, atomic_long_t *v)
88 return atomic64_fetch_add_acquire(i, v);
92 atomic_long_fetch_add_release(long i, atomic_long_t *v)
94 return atomic64_fetch_add_release(i, v);
98 atomic_long_fetch_add_relaxed(long i, atomic_long_t *v)
100 return atomic64_fetch_add_relaxed(i, v);
104 atomic_long_sub(long i, atomic_long_t *v)
110 atomic_long_sub_return(long i, atomic_long_t *v)
112 return atomic64_sub_return(i, v);
116 atomic_long_sub_return_acquire(long i, atomic_long_t *v)
118 return atomic64_sub_return_acquire(i, v);
122 atomic_long_sub_return_release(long i, atomic_long_t *v)
124 return atomic64_sub_return_release(i, v);
128 atomic_long_sub_return_relaxed(long i, atomic_long_t *v)
130 return atomic64_sub_return_relaxed(i, v);
134 atomic_long_fetch_sub(long i, atomic_long_t *v)
136 return atomic64_fetch_sub(i, v);
140 atomic_long_fetch_sub_acquire(long i, atomic_long_t *v)
142 return atomic64_fetch_sub_acquire(i, v);
146 atomic_long_fetch_sub_release(long i, atomic_long_t *v)
148 return atomic64_fetch_sub_release(i, v);
152 atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v)
154 return atomic64_fetch_sub_relaxed(i, v);
158 atomic_long_inc(atomic_long_t *v)
164 atomic_long_inc_return(atomic_long_t *v)
166 return atomic64_inc_return(v);
170 atomic_long_inc_return_acquire(atomic_long_t *v)
172 return atomic64_inc_return_acquire(v);
176 atomic_long_inc_return_release(atomic_long_t *v)
178 return atomic64_inc_return_release(v);
182 atomic_long_inc_return_relaxed(atomic_long_t *v)
184 return atomic64_inc_return_relaxed(v);
188 atomic_long_fetch_inc(atomic_long_t *v)
190 return atomic64_fetch_inc(v);
194 atomic_long_fetch_inc_acquire(atomic_long_t *v)
196 return atomic64_fetch_inc_acquire(v);
200 atomic_long_fetch_inc_release(atomic_long_t *v)
202 return atomic64_fetch_inc_release(v);
206 atomic_long_fetch_inc_relaxed(atomic_long_t *v)
208 return atomic64_fetch_inc_relaxed(v);
212 atomic_long_dec(atomic_long_t *v)
218 atomic_long_dec_return(atomic_long_t *v)
220 return atomic64_dec_return(v);
224 atomic_long_dec_return_acquire(atomic_long_t *v)
226 return atomic64_dec_return_acquire(v);
230 atomic_long_dec_return_release(atomic_long_t *v)
232 return atomic64_dec_return_release(v);
236 atomic_long_dec_return_relaxed(atomic_long_t *v)
238 return atomic64_dec_return_relaxed(v);
242 atomic_long_fetch_dec(atomic_long_t *v)
244 return atomic64_fetch_dec(v);
248 atomic_long_fetch_dec_acquire(atomic_long_t *v)
250 return atomic64_fetch_dec_acquire(v);
254 atomic_long_fetch_dec_release(atomic_long_t *v)
256 return atomic64_fetch_dec_release(v);
260 atomic_long_fetch_dec_relaxed(atomic_long_t *v)
262 return atomic64_fetch_dec_relaxed(v);
266 atomic_long_and(long i, atomic_long_t *v)
272 atomic_long_fetch_and(long i, atomic_long_t *v)
274 return atomic64_fetch_and(i, v);
278 atomic_long_fetch_and_acquire(long i, atomic_long_t *v)
280 return atomic64_fetch_and_acquire(i, v);
284 atomic_long_fetch_and_release(long i, atomic_long_t *v)
286 return atomic64_fetch_and_release(i, v);
290 atomic_long_fetch_and_relaxed(long i, atomic_long_t *v)
292 return atomic64_fetch_and_relaxed(i, v);
296 atomic_long_andnot(long i, atomic_long_t *v)
298 atomic64_andnot(i, v);
302 atomic_long_fetch_andnot(long i, atomic_long_t *v)
304 return atomic64_fetch_andnot(i, v);
308 atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v)
310 return atomic64_fetch_andnot_acquire(i, v);
314 atomic_long_fetch_andnot_release(long i, atomic_long_t *v)
316 return atomic64_fetch_andnot_release(i, v);
320 atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v)
322 return atomic64_fetch_andnot_relaxed(i, v);
326 atomic_long_or(long i, atomic_long_t *v)
332 atomic_long_fetch_or(long i, atomic_long_t *v)
334 return atomic64_fetch_or(i, v);
338 atomic_long_fetch_or_acquire(long i, atomic_long_t *v)
340 return atomic64_fetch_or_acquire(i, v);
344 atomic_long_fetch_or_release(long i, atomic_long_t *v)
346 return atomic64_fetch_or_release(i, v);
350 atomic_long_fetch_or_relaxed(long i, atomic_long_t *v)
352 return atomic64_fetch_or_relaxed(i, v);
356 atomic_long_xor(long i, atomic_long_t *v)
362 atomic_long_fetch_xor(long i, atomic_long_t *v)
364 return atomic64_fetch_xor(i, v);
368 atomic_long_fetch_xor_acquire(long i, atomic_long_t *v)
370 return atomic64_fetch_xor_acquire(i, v);
374 atomic_long_fetch_xor_release(long i, atomic_long_t *v)
376 return atomic64_fetch_xor_release(i, v);
380 atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v)
382 return atomic64_fetch_xor_relaxed(i, v);
386 atomic_long_xchg(atomic_long_t *v, long i)
388 return atomic64_xchg(v, i);
392 atomic_long_xchg_acquire(atomic_long_t *v, long i)
394 return atomic64_xchg_acquire(v, i);
398 atomic_long_xchg_release(atomic_long_t *v, long i)
400 return atomic64_xchg_release(v, i);
404 atomic_long_xchg_relaxed(atomic_long_t *v, long i)
406 return atomic64_xchg_relaxed(v, i);
410 atomic_long_cmpxchg(atomic_long_t *v, long old, long new)
412 return atomic64_cmpxchg(v, old, new);
416 atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new)
418 return atomic64_cmpxchg_acquire(v, old, new);
422 atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new)
424 return atomic64_cmpxchg_release(v, old, new);
428 atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new)
430 return atomic64_cmpxchg_relaxed(v, old, new);
434 atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new)
436 return atomic64_try_cmpxchg(v, (s64 *)old, new);
440 atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new)
442 return atomic64_try_cmpxchg_acquire(v, (s64 *)old, new);
446 atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new)
448 return atomic64_try_cmpxchg_release(v, (s64 *)old, new);
452 atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new)
454 return atomic64_try_cmpxchg_relaxed(v, (s64 *)old, new);
458 atomic_long_sub_and_test(long i, atomic_long_t *v)
460 return atomic64_sub_and_test(i, v);
464 atomic_long_dec_and_test(atomic_long_t *v)
466 return atomic64_dec_and_test(v);
470 atomic_long_inc_and_test(atomic_long_t *v)
472 return atomic64_inc_and_test(v);
476 atomic_long_add_negative(long i, atomic_long_t *v)
478 return atomic64_add_negative(i, v);
482 atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u)
484 return atomic64_fetch_add_unless(v, a, u);
488 atomic_long_add_unless(atomic_long_t *v, long a, long u)
490 return atomic64_add_unless(v, a, u);
494 atomic_long_inc_not_zero(atomic_long_t *v)
496 return atomic64_inc_not_zero(v);
500 atomic_long_inc_unless_negative(atomic_long_t *v)
502 return atomic64_inc_unless_negative(v);
506 atomic_long_dec_unless_positive(atomic_long_t *v)
508 return atomic64_dec_unless_positive(v);
512 atomic_long_dec_if_positive(atomic_long_t *v)
514 return atomic64_dec_if_positive(v);
517 #else /* CONFIG_64BIT */
520 atomic_long_read(const atomic_long_t *v)
522 return atomic_read(v);
526 atomic_long_read_acquire(const atomic_long_t *v)
528 return atomic_read_acquire(v);
532 atomic_long_set(atomic_long_t *v, long i)
538 atomic_long_set_release(atomic_long_t *v, long i)
540 atomic_set_release(v, i);
544 atomic_long_add(long i, atomic_long_t *v)
550 atomic_long_add_return(long i, atomic_long_t *v)
552 return atomic_add_return(i, v);
556 atomic_long_add_return_acquire(long i, atomic_long_t *v)
558 return atomic_add_return_acquire(i, v);
562 atomic_long_add_return_release(long i, atomic_long_t *v)
564 return atomic_add_return_release(i, v);
568 atomic_long_add_return_relaxed(long i, atomic_long_t *v)
570 return atomic_add_return_relaxed(i, v);
574 atomic_long_fetch_add(long i, atomic_long_t *v)
576 return atomic_fetch_add(i, v);
580 atomic_long_fetch_add_acquire(long i, atomic_long_t *v)
582 return atomic_fetch_add_acquire(i, v);
586 atomic_long_fetch_add_release(long i, atomic_long_t *v)
588 return atomic_fetch_add_release(i, v);
592 atomic_long_fetch_add_relaxed(long i, atomic_long_t *v)
594 return atomic_fetch_add_relaxed(i, v);
598 atomic_long_sub(long i, atomic_long_t *v)
604 atomic_long_sub_return(long i, atomic_long_t *v)
606 return atomic_sub_return(i, v);
610 atomic_long_sub_return_acquire(long i, atomic_long_t *v)
612 return atomic_sub_return_acquire(i, v);
616 atomic_long_sub_return_release(long i, atomic_long_t *v)
618 return atomic_sub_return_release(i, v);
622 atomic_long_sub_return_relaxed(long i, atomic_long_t *v)
624 return atomic_sub_return_relaxed(i, v);
628 atomic_long_fetch_sub(long i, atomic_long_t *v)
630 return atomic_fetch_sub(i, v);
634 atomic_long_fetch_sub_acquire(long i, atomic_long_t *v)
636 return atomic_fetch_sub_acquire(i, v);
640 atomic_long_fetch_sub_release(long i, atomic_long_t *v)
642 return atomic_fetch_sub_release(i, v);
646 atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v)
648 return atomic_fetch_sub_relaxed(i, v);
652 atomic_long_inc(atomic_long_t *v)
658 atomic_long_inc_return(atomic_long_t *v)
660 return atomic_inc_return(v);
664 atomic_long_inc_return_acquire(atomic_long_t *v)
666 return atomic_inc_return_acquire(v);
670 atomic_long_inc_return_release(atomic_long_t *v)
672 return atomic_inc_return_release(v);
676 atomic_long_inc_return_relaxed(atomic_long_t *v)
678 return atomic_inc_return_relaxed(v);
682 atomic_long_fetch_inc(atomic_long_t *v)
684 return atomic_fetch_inc(v);
688 atomic_long_fetch_inc_acquire(atomic_long_t *v)
690 return atomic_fetch_inc_acquire(v);
694 atomic_long_fetch_inc_release(atomic_long_t *v)
696 return atomic_fetch_inc_release(v);
700 atomic_long_fetch_inc_relaxed(atomic_long_t *v)
702 return atomic_fetch_inc_relaxed(v);
706 atomic_long_dec(atomic_long_t *v)
712 atomic_long_dec_return(atomic_long_t *v)
714 return atomic_dec_return(v);
718 atomic_long_dec_return_acquire(atomic_long_t *v)
720 return atomic_dec_return_acquire(v);
724 atomic_long_dec_return_release(atomic_long_t *v)
726 return atomic_dec_return_release(v);
730 atomic_long_dec_return_relaxed(atomic_long_t *v)
732 return atomic_dec_return_relaxed(v);
736 atomic_long_fetch_dec(atomic_long_t *v)
738 return atomic_fetch_dec(v);
742 atomic_long_fetch_dec_acquire(atomic_long_t *v)
744 return atomic_fetch_dec_acquire(v);
748 atomic_long_fetch_dec_release(atomic_long_t *v)
750 return atomic_fetch_dec_release(v);
754 atomic_long_fetch_dec_relaxed(atomic_long_t *v)
756 return atomic_fetch_dec_relaxed(v);
760 atomic_long_and(long i, atomic_long_t *v)
766 atomic_long_fetch_and(long i, atomic_long_t *v)
768 return atomic_fetch_and(i, v);
772 atomic_long_fetch_and_acquire(long i, atomic_long_t *v)
774 return atomic_fetch_and_acquire(i, v);
778 atomic_long_fetch_and_release(long i, atomic_long_t *v)
780 return atomic_fetch_and_release(i, v);
784 atomic_long_fetch_and_relaxed(long i, atomic_long_t *v)
786 return atomic_fetch_and_relaxed(i, v);
790 atomic_long_andnot(long i, atomic_long_t *v)
796 atomic_long_fetch_andnot(long i, atomic_long_t *v)
798 return atomic_fetch_andnot(i, v);
802 atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v)
804 return atomic_fetch_andnot_acquire(i, v);
808 atomic_long_fetch_andnot_release(long i, atomic_long_t *v)
810 return atomic_fetch_andnot_release(i, v);
814 atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v)
816 return atomic_fetch_andnot_relaxed(i, v);
820 atomic_long_or(long i, atomic_long_t *v)
826 atomic_long_fetch_or(long i, atomic_long_t *v)
828 return atomic_fetch_or(i, v);
832 atomic_long_fetch_or_acquire(long i, atomic_long_t *v)
834 return atomic_fetch_or_acquire(i, v);
838 atomic_long_fetch_or_release(long i, atomic_long_t *v)
840 return atomic_fetch_or_release(i, v);
844 atomic_long_fetch_or_relaxed(long i, atomic_long_t *v)
846 return atomic_fetch_or_relaxed(i, v);
850 atomic_long_xor(long i, atomic_long_t *v)
856 atomic_long_fetch_xor(long i, atomic_long_t *v)
858 return atomic_fetch_xor(i, v);
862 atomic_long_fetch_xor_acquire(long i, atomic_long_t *v)
864 return atomic_fetch_xor_acquire(i, v);
868 atomic_long_fetch_xor_release(long i, atomic_long_t *v)
870 return atomic_fetch_xor_release(i, v);
874 atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v)
876 return atomic_fetch_xor_relaxed(i, v);
880 atomic_long_xchg(atomic_long_t *v, long i)
882 return atomic_xchg(v, i);
886 atomic_long_xchg_acquire(atomic_long_t *v, long i)
888 return atomic_xchg_acquire(v, i);
892 atomic_long_xchg_release(atomic_long_t *v, long i)
894 return atomic_xchg_release(v, i);
898 atomic_long_xchg_relaxed(atomic_long_t *v, long i)
900 return atomic_xchg_relaxed(v, i);
904 atomic_long_cmpxchg(atomic_long_t *v, long old, long new)
906 return atomic_cmpxchg(v, old, new);
910 atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new)
912 return atomic_cmpxchg_acquire(v, old, new);
916 atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new)
918 return atomic_cmpxchg_release(v, old, new);
922 atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new)
924 return atomic_cmpxchg_relaxed(v, old, new);
928 atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new)
930 return atomic_try_cmpxchg(v, (int *)old, new);
934 atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new)
936 return atomic_try_cmpxchg_acquire(v, (int *)old, new);
940 atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new)
942 return atomic_try_cmpxchg_release(v, (int *)old, new);
946 atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new)
948 return atomic_try_cmpxchg_relaxed(v, (int *)old, new);
952 atomic_long_sub_and_test(long i, atomic_long_t *v)
954 return atomic_sub_and_test(i, v);
958 atomic_long_dec_and_test(atomic_long_t *v)
960 return atomic_dec_and_test(v);
964 atomic_long_inc_and_test(atomic_long_t *v)
966 return atomic_inc_and_test(v);
970 atomic_long_add_negative(long i, atomic_long_t *v)
972 return atomic_add_negative(i, v);
976 atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u)
978 return atomic_fetch_add_unless(v, a, u);
982 atomic_long_add_unless(atomic_long_t *v, long a, long u)
984 return atomic_add_unless(v, a, u);
988 atomic_long_inc_not_zero(atomic_long_t *v)
990 return atomic_inc_not_zero(v);
994 atomic_long_inc_unless_negative(atomic_long_t *v)
996 return atomic_inc_unless_negative(v);
1000 atomic_long_dec_unless_positive(atomic_long_t *v)
1002 return atomic_dec_unless_positive(v);
1006 atomic_long_dec_if_positive(atomic_long_t *v)
1008 return atomic_dec_if_positive(v);
1011 #endif /* CONFIG_64BIT */
1012 #endif /* _ASM_GENERIC_ATOMIC_LONG_H */
1013 // 77558968132ce4f911ad53f6f52ce423006f6268