mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
e3d18cee25
The generated atomic headers are only intended to be included directly by <linux/atomic.h>, but are spread across include/linux/ and include/asm-generic/, where people mnay be encouraged to include them. This patch centralizes them under include/linux/atomic/. Other than the header guards and hashes, there is no change to any of the generated headers as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20210713105253.7615-4-mark.rutland@arm.com
21 lines
626 B
Bash
Executable File
21 lines
626 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Generate atomic headers
|
|
|
|
ATOMICDIR=$(dirname $0)
|
|
ATOMICTBL=${ATOMICDIR}/atomics.tbl
|
|
LINUXDIR=${ATOMICDIR}/../..
|
|
|
|
cat <<EOF |
|
|
gen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h
|
|
gen-atomic-long.sh linux/atomic/atomic-long.h
|
|
gen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h
|
|
EOF
|
|
while read script header args; do
|
|
/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header}
|
|
HASH="$(sha1sum ${LINUXDIR}/include/${header})"
|
|
HASH="${HASH%% *}"
|
|
printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header}
|
|
done
|