21 lines · 683 B · Shell
RawDownload
#!/bin/sh# SPDX-License-Identifier: GPL-2.0## Generate atomic headers ATOMICDIR=$(dirname $0)ATOMICTBL=${ATOMICDIR}/atomics.tblLINUXDIR=${ATOMICDIR}/../.. cat <<EOF |gen-atomic-instrumented.sh      linux/atomic/atomic-instrumented.hgen-atomic-long.sh              linux/atomic/atomic-long.hgen-atomic-fallback.sh          linux/atomic/atomic-arch-fallback.hgen-rust-atomic-helpers.sh      ../rust/helpers/atomic.cEOFwhile 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