summaryrefslogtreecommitdiff
path: root/scripts/atomic/check-atomics.sh
blob: 1ed39ccb26190ac1d19ca07687d48a376a52ddb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Check if atomic headers are up-to-date

ATOMICDIR=$(dirname $0)
ATOMICTBL=${ATOMICDIR}/atomics.tbl
LINUXDIR=${ATOMICDIR}/../..

cat <<EOF |
gen-atomic-instrumented.sh      asm-generic/atomic-instrumented.h
gen-atomic-long.sh              asm-generic/atomic-long.h
gen-atomic-fallback.sh          linux/atomic-fallback.h
EOF
while read script header; do
	if ! (/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
		printf "warning: include/${header} is out-of-date.\n"
	fi
done