File: atomics.tbl

package info (click to toggle)
linux 6.12.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,673,568 kB
  • sloc: ansic: 25,888,630; asm: 268,782; sh: 136,481; python: 64,809; makefile: 55,668; perl: 38,052; xml: 19,270; cpp: 5,893; yacc: 4,923; lex: 2,939; awk: 1,592; sed: 28; ruby: 25
file content (41 lines) | stat: -rw-r--r-- 1,162 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# name	meta	args...
#
# Where meta contains a string of variants to generate.
# Upper-case implies _{acquire,release,relaxed} variants.
# Valid meta values are:
# * B/b	- bool: returns bool
# * v	- void: returns void
# * I/i	- int: returns base type
# * R	- return: returns base type (has _return variants)
# * F/f	- fetch: returns base type (has fetch_ variants)
# * l	- load: returns base type (has _acquire order variant)
# * s	- store: returns void (has _release order variant)
#
# Where args contains list of type[:name], where type is:
# * cv	- const pointer to atomic base type (atomic_t/atomic64_t/atomic_long_t)
# * v	- pointer to atomic base type (atomic_t/atomic64_t/atomic_long_t)
# * i	- base type (int/s64/long)
# * p	- pointer to base type (int/s64/long)
#
read			l	cv
set			s	v	i
add			vRF	i	v
sub			vRF	i	v
inc			vRF	v
dec			vRF	v
and			vF	i	v
andnot			vF	i	v
or			vF	i	v
xor			vF	i	v
xchg			I	v	i:new
cmpxchg			I	v	i:old	i:new
try_cmpxchg		B	v	p:old	i:new
sub_and_test		b	i	v
dec_and_test		b	v
inc_and_test		b	v
add_negative		B	i	v
add_unless		fb	v	i:a	i:u
inc_not_zero		b	v
inc_unless_negative	b	v
dec_unless_positive	b	v
dec_if_positive		i	v