Sindbad~EG File Manager

Current Path : /usr/src/linux-headers-5.4.0-1108-azure/scripts/atomic/
Upload File :
Current File : //usr/src/linux-headers-5.4.0-1108-azure/scripts/atomic/gen-atomics.sh

#!/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      asm-generic/atomic-instrumented.h
gen-atomic-long.sh              asm-generic/atomic-long.h
gen-atomic-fallback.sh          linux/atomic-fallback.h
EOF
while read script header; do
	/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} > ${LINUXDIR}/include/${header}
	HASH="$(sha1sum ${LINUXDIR}/include/${header})"
	HASH="${HASH%% *}"
	printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header}
done

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists