10cf264b3SMark Rutland#!/bin/sh 20cf264b3SMark Rutland# SPDX-License-Identifier: GPL-2.0 30cf264b3SMark Rutland# 40cf264b3SMark Rutland# Generate atomic headers 50cf264b3SMark Rutland 60cf264b3SMark RutlandATOMICDIR=$(dirname $0) 70cf264b3SMark RutlandATOMICTBL=${ATOMICDIR}/atomics.tbl 80cf264b3SMark RutlandLINUXDIR=${ATOMICDIR}/../.. 90cf264b3SMark Rutland 100cf264b3SMark Rutlandcat <<EOF | 11*e3d18ceeSMark Rutlandgen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h 12*e3d18ceeSMark Rutlandgen-atomic-long.sh linux/atomic/atomic-long.h 13*e3d18ceeSMark Rutlandgen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h 140cf264b3SMark RutlandEOF 1537f8173dSPeter Zijlstrawhile read script header args; do 1637f8173dSPeter Zijlstra /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header} 170cf264b3SMark Rutland HASH="$(sha1sum ${LINUXDIR}/include/${header})" 180cf264b3SMark Rutland HASH="${HASH%% *}" 190cf264b3SMark Rutland printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} 200cf264b3SMark Rutlanddone 21