aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-10-28 12:55:24 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-10-28 12:55:24 +0100
commit62c482e93f407bcc7971547742094301374b841e (patch)
tree930f36f9263b5d02c176d6b13b0ed5a762c8fd83 /sysdeps
parent32ad5b3328e0ce53ca27e185a89ca44c1d0acd0c (diff)
downloadglibc-62c482e93f407bcc7971547742094301374b841e.zip
glibc-62c482e93f407bcc7971547742094301374b841e.tar.gz
glibc-62c482e93f407bcc7971547742094301374b841e.tar.bz2
hurd: Fix cancellation just before RPC call
* sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Set intr_port to 0 when canceled. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Pass intr_port address.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/i386/intr-msg.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h
index baa9ba9..7788c3b 100644
--- a/sysdeps/mach/hurd/i386/intr-msg.h
+++ b/sysdeps/mach/hurd/i386/intr-msg.h
@@ -23,7 +23,7 @@
/* After _hurd_intr_rpc_msg_about_to we need to make a last check of cancel, in
case we got interrupted right before _hurd_intr_rpc_msg_about_to. */
-#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify, cancel_p) \
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify, cancel_p, intr_port_p) \
({ \
error_t err; \
asm (".globl _hurd_intr_rpc_msg_about_to\n" \
@@ -31,17 +31,18 @@
".globl _hurd_intr_rpc_msg_do_trap\n" \
".globl _hurd_intr_rpc_msg_in_trap\n" \
".globl _hurd_intr_rpc_msg_sp_restored\n" \
- "_hurd_intr_rpc_msg_about_to: cmpl $0, %4\n" \
+ "_hurd_intr_rpc_msg_about_to: cmpl $0, %5\n" \
" jz _hurd_intr_rpc_msg_do\n" \
- " movl %5, %%eax\n" \
+ " movl $0, %3\n" \
+ " movl %6, %%eax\n" \
" jmp _hurd_intr_rpc_msg_sp_restored\n" \
"_hurd_intr_rpc_msg_do: movl %%esp, %%ecx\n" \
- " leal %3, %%esp\n" \
+ " leal %4, %%esp\n" \
"_hurd_intr_rpc_msg_cx_sp: movl $-25, %%eax\n" \
"_hurd_intr_rpc_msg_do_trap: lcall $7, $0 # status in %0\n" \
"_hurd_intr_rpc_msg_in_trap: movl %%ecx, %%esp\n" \
"_hurd_intr_rpc_msg_sp_restored:" \
- : "=a" (err), "+m" (option), "+m" (timeout) \
+ : "=a" (err), "+m" (option), "+m" (timeout), "=m" (*intr_port_p) \
: "m" ((&msg)[-1]), "m" (*cancel_p), "i" (EINTR) \
: "ecx"); \
err; \