Mark Rutland | 0cf264b | 2019-02-11 13:20:35 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | # |
| 4 | # Generate atomic headers |
| 5 | |
| 6 | ATOMICDIR=$(dirname $0) |
| 7 | ATOMICTBL=${ATOMICDIR}/atomics.tbl |
| 8 | LINUXDIR=${ATOMICDIR}/../.. |
| 9 | |
| 10 | cat <<EOF | |
Mark Rutland | e3d18ce | 2021-07-13 11:52:51 +0100 | [diff] [blame] | 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 |
Mark Rutland | 0cf264b | 2019-02-11 13:20:35 +0000 | [diff] [blame] | 14 | EOF |
Peter Zijlstra | 37f8173 | 2020-01-24 22:13:03 +0100 | [diff] [blame] | 15 | while read script header args; do |
| 16 | /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header} |
Mark Rutland | 0cf264b | 2019-02-11 13:20:35 +0000 | [diff] [blame] | 17 | HASH="$(sha1sum ${LINUXDIR}/include/${header})" |
| 18 | HASH="${HASH%% *}" |
| 19 | printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} |
| 20 | done |