gen-atomics.sh (611ac726f9ebbb12f2113e5345ef109660954eeb) | gen-atomics.sh (f3e615b4db1fb7034f1d76dc307b77cc848f040e) |
---|---|
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# 4# Generate atomic headers 5 6ATOMICDIR=$(dirname $0) 7ATOMICTBL=${ATOMICDIR}/atomics.tbl 8LINUXDIR=${ATOMICDIR}/../.. 9 10cat <<EOF | 11gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h 12gen-atomic-long.sh asm-generic/atomic-long.h | 1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# 4# Generate atomic headers 5 6ATOMICDIR=$(dirname $0) 7ATOMICTBL=${ATOMICDIR}/atomics.tbl 8LINUXDIR=${ATOMICDIR}/../.. 9 10cat <<EOF | 11gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h 12gen-atomic-long.sh asm-generic/atomic-long.h |
13gen-atomic-fallback.sh linux/atomic-arch-fallback.h arch_ | 13gen-atomic-fallback.sh linux/atomic-arch-fallback.h |
14EOF 15while read script header args; do 16 /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header} 17 HASH="$(sha1sum ${LINUXDIR}/include/${header})" 18 HASH="${HASH%% *}" 19 printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} 20done | 14EOF 15while read script header args; do 16 /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header} 17 HASH="$(sha1sum ${LINUXDIR}/include/${header})" 18 HASH="${HASH%% *}" 19 printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} 20done |