summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdsig.c6
-rw-r--r--hurd/intr-msg.c16
2 files changed, 9 insertions, 13 deletions
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 10dbceb4f4..ca4e22925b 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -250,7 +250,8 @@ interrupted_reply_port_location (struct machine_thread_all_state *thread_state,
return portloc;
}
-
+
+#include "intr-msg.h"
/* SS->thread is suspended.
@@ -274,7 +275,7 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
mach_msg_type_name_t reply_port_type,
int untraced)
{
- extern const void _hurd_intr_rpc_msg_do_trap, _hurd_intr_rpc_msg_in_trap;
+ extern const void _hurd_intr_rpc_msg_in_trap;
mach_port_t rcv_port = MACH_PORT_NULL;
mach_port_t intr_port;
@@ -294,6 +295,7 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
/* The thread is about to do the RPC, but hasn't yet entered
mach_msg. Mutate the thread's state so it knows not to try
the RPC. */
+ INTR_MSG_BACK_OUT (&state->basic);
MACHINE_THREAD_STATE_SET_PC (&state->basic,
&_hurd_intr_rpc_msg_in_trap);
state->basic.SYSRETURN = MACH_SEND_INTERRUPTED;
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index 6f670b538f..024cbfbd3e 100644
--- a/hurd/intr-msg.c
+++ b/hurd/intr-msg.c
@@ -21,6 +21,9 @@ Cambridge, MA 02139, USA. */
#include <mach/mig_errors.h>
#include <hurd/signal.h>
+#include "intr-msg.h"
+
+
error_t
_hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
mach_msg_option_t option,
@@ -56,17 +59,8 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
ss->cancel = 0;
}
else
- /* err = intr_msg_trap (msg, option, send_size,
- rcv_size, rcv_name, timeout, notify);
- */
- asm (".globl _hurd_intr_rpc_msg_do_trap\n"
- ".globl _hurd_intr_rpc_msg_in_trap\n"
- " movl %%esp, %%ecx\n"
- " leal %1, %%esp\n"
- " 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"
- : "=a" (err) : "m" ((&msg)[-1]) : "%ecx");
+ err = INTR_MSG_TRAP (msg, option, send_size,
+ rcv_size, rcv_name, timeout, notify);
switch (err)
{