Skip to content

Commit

Permalink
x86, syscall: Allow syscall offset to be symbolic
Browse files Browse the repository at this point in the history
Allow the specified syscall offset to be symbolic, e.g. a macro.  For
offset system calls, this if nothing else makes the generated code
easier to read.

Suggested-by: H. J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/r/1321569446-20433-7-git-send-email-hpa@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
H. Peter Anvin committed Nov 19, 2011
1 parent 61f1e7e commit 3f86886
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/x86/syscalls/syscallhdr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
echo ""

while read nr abi name entry ; do
echo "#define __NR_${prefix}${name}" $((nr+offset))
if [ -z "$offset" ]; then
echo "#define __NR_${prefix}${name} $nr"
else
echo "#define __NR_${prefix}${name} ($offset + $nr)"
fi
done

echo ""
Expand Down

0 comments on commit 3f86886

Please sign in to comment.