2 # SPDX-License-Identifier: GPL-2.0
4 # Generate atomic headers
6 ATOMICDIR=$(dirname $0)
7 ATOMICTBL=${ATOMICDIR}/atomics.tbl
8 LINUXDIR=${ATOMICDIR}/../..
11 gen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h
12 gen-atomic-long.sh linux/atomic/atomic-long.h
13 gen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h
15 while read script header args; do
16 /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header}
17 HASH="$(sha1sum ${LINUXDIR}/include/${header})"
19 printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header}