summaryrefslogtreecommitdiff
path: root/hurd/hurdsig.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-07 14:57:38 +0000
committerRoland McGrath <roland@gnu.org>1996-05-07 14:57:38 +0000
commit93a470c71a236c6fbf4f2a207eb3961754187e80 (patch)
treec6801bf6e8f7652cd06f81e8ff278243b5592a0d /hurd/hurdsig.c
parent4ddc1f9dd6c09e8924204f9ecf70c95157e555ec (diff)
Tue May 7 10:51:52 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* wcsmbs/wcwidth.c, wcsmbs/wcswidth.c: Fixed typos. * sysdeps/unix/sysv/linux/sys/mman.h: Fixed typo. * sysdeps/stub/sched_getp.c: Add missing #include <sys/types.h>. * sysdeps/stub/sched_sets.c: Likewise. * sysdeps/stub/sched_setp.c: Likewise. * sysdeps/stub/sched_rr_gi.c: Likewise. * sysdeps/stub/sched_gets.c: Likewise. * hurd/hurdsig.c: Use struct hurd_signal_detail. * hurd/hurd/fd.h (_hurd_fd_error): Likewise. * sysdeps/mach/hurd/sysd-stdio.c (fd_fail): Likewise.
Diffstat (limited to 'hurd/hurdsig.c')
-rw-r--r--hurd/hurdsig.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index b1a551d7f3..2a517cfa5a 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -428,7 +428,7 @@ sigset_t _hurdsig_preempted_set;
/* Deliver a signal. SS is not locked. */
void
_hurd_internal_post_signal (struct hurd_sigstate *ss,
- int signo, long int sigcode, int sigerror,
+ int signo, struct hurd_signal_detail *detail,
mach_port_t reply_port,
mach_msg_type_name_t reply_port_type,
int untraced)
@@ -459,10 +459,9 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
void mark_pending (void)
{
__sigaddset (&ss->pending, signo);
- /* Save the code to be given to the handler when SIGNO is
+ /* Save the details to be given to the handler when SIGNO is
unblocked. */
- ss->pending_data[signo].code = sigcode;
- ss->pending_data[signo].error = sigerror;
+ ss->pending_data[signo] = *detail;
}
/* Suspend the process with SIGNO. */
@@ -540,8 +539,8 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
handler = SIG_ERR;
for (pe = ss->preempters; pe && handler == SIG_ERR; pe = pe->next)
- if (HURD_PREEMPT_SIGNAL_P (pe, signo, sigcode))
- handler = (*pe->preempter) (pe, ss, &signo, &sigcode, &sigerror);
+ if (HURD_PREEMPT_SIGNAL_P (pe, signo, detail->code))
+ handler = (*pe->preempter) (pe, ss, &signo, detail);
if (handler == SIG_ERR && (__sigmask (signo) & _hurdsig_preempted_set))
{
@@ -1061,14 +1060,18 @@ _S_msg_sig_post (mach_port_t me,
mach_port_t refport)
{
error_t err;
+ struct hurd_signal_detail d;
if (err = signal_allowed (signo, refport))
return err;
+ d.code = sigcode;
+ d.exc = 0;
+
/* Post the signal to the designated signal-receiving thread. This will
reply when the signal can be considered delivered. */
_hurd_internal_post_signal (_hurd_thread_sigstate (_hurd_sigthread),
- signo, sigcode, 0, reply_port, reply_port_type,
+ signo, &d, reply_port, reply_port_type,
0); /* Stop if traced. */
return MIG_NO_REPLY; /* Already replied. */
@@ -1085,14 +1088,18 @@ _S_msg_sig_post_untraced (mach_port_t me,
mach_port_t refport)
{
error_t err;
+ struct hurd_signal_detail d;
if (err = signal_allowed (signo, refport))
return err;
+ d.code = sigcode;
+ d.exc = 0;
+
/* Post the signal to the designated signal-receiving thread. This will
reply when the signal can be considered delivered. */
_hurd_internal_post_signal (_hurd_thread_sigstate (_hurd_sigthread),
- signo, sigcode, 0, reply_port, reply_port_type,
+ signo, &d, reply_port, reply_port_type,
1); /* Untraced flag. */
return MIG_NO_REPLY; /* Already replied. */