summaryrefslogtreecommitdiff
path: root/sysdeps/unix/make-syscalls.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/make-syscalls.sh')
-rw-r--r--sysdeps/unix/make-syscalls.sh29
1 files changed, 26 insertions, 3 deletions
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 6eba62c946..c2a203ebf2 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -154,16 +154,28 @@ while read file srcfile caller syscall args strong weak; do
case x"$syscall" in
x-) callnum=_ ;;
*)
+ set `echo $syscall | sed -e 's/^\(.*\):\(.*\)/\1 \2/'`
+ syscall=$1; subcall=$2
# Figure out if $syscall is defined with a number in syscall.h.
- callnum=-
+ callnum=-; subcallnum=
eval `{ echo "#include <sysdep.h>";
echo "callnum=SYS_ify ($syscall)"; } |
$asm_CPP -D__OPTIMIZE__ - |
sed -n -e "/^callnum=.*$syscall/d" \
-e "/^\(callnum=\)[ ]*\(.*\)/s//\1'\2'/p"`
+ if test ! -z "$subcall" ; then
+ # Figure out if $subcall is defined with a number in syscall.h.
+ subcallnum=
+ eval `{ echo "#include <sysdep.h>";
+ echo "subcallnum=SYS_ify (SUB_$subcall)"; } |
+ $asm_CPP -D__OPTIMIZE__ - |
+ sed -n -e "/^subcallnum=.*$subcall/d" \
+ -e "/^\(subcallnum=\)[ ]*\(.*\)/s//\1'\2'/p"`
+ fi
;;
esac
+ restart=0
cancellable=0
noerrno=0
errval=0
@@ -171,6 +183,7 @@ while read file srcfile caller syscall args strong weak; do
C*) cancellable=1; args=`echo $args | sed 's/C:\?//'`;;
E*) noerrno=1; args=`echo $args | sed 's/E:\?//'`;;
V*) errval=1; args=`echo $args | sed 's/V:\?//'`;;
+ R*) restart=1; args=`echo $args | sed 's/R//'`;;
esac
# Derive the number of arguments from the argument signature
@@ -191,7 +204,7 @@ while read file srcfile caller syscall args strong weak; do
# Make sure only the first syscall rule is used, if multiple dirs
# define the same syscall.
echo ''
- echo "#### CALL=$file NUMBER=$callnum ARGS=$args SOURCE=$srcfile"
+ echo "#### CALL=$file NUMBER=$callnum SUBNUMBER=$subcallnum ARGS=$args SOURCE=$srcfile"
# If there are versioned aliases the entry is only generated for the
# shared library, unless it is a default version.
@@ -246,11 +259,21 @@ while read file srcfile caller syscall args strong weak; do
(echo '/* Dummy module requested by syscalls.list */'; \\"
;;
x*)
+
echo "\
\$(make-target-directory)
(echo '#define SYSCALL_NAME $syscall'; \\
- echo '#define SYSCALL_NARGS $nargs'; \\
echo '#define SYSCALL_SYMBOL $strong'; \\"
+ if [ x"$subcallnum" != x ]; then
+ echo "\
+ echo '#define SYSCALL_SUBCALL_NAME $subcall'; \\
+ echo '#define SYSCALL_NARGS `expr $nargs + 1`'; \\"
+ else
+ echo "\
+ echo '#define SYSCALL_NARGS $nargs'; \\"
+ fi
+ [ $restart = 0 ] || echo "\
+ echo '#define SYSCALL_RESTARTABLE 1'; \\"
[ $cancellable = 0 ] || echo "\
echo '#define SYSCALL_CANCELLABLE 1'; \\"
[ $noerrno = 0 ] || echo "\