From 3df16267afabe8ee7586c45737ca631ec603aec7 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 9 Oct 2015 21:09:28 +0200 Subject: fix comment --- hurd/hurdsig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index f529f9297a..3969a84523 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -241,7 +241,7 @@ interrupted_reply_port_location (thread_t thread, mach_port_t *portloc = &THREAD_TCB(thread, thread_state)->reply_port; if (sigthread && _hurdsig_catch_memory_fault (portloc)) - /* Faulted trying to read the stack. */ + /* Faulted trying to read the TCB. */ return NULL; /* Fault now if this pointer is bogus. */ -- cgit v1.2.3 From 2a224479ae9752e9490b0f7045194ae6d6706c51 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Oct 2015 16:24:26 +0200 Subject: Add patch message --- .topdeps | 2 +- .topmsg | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.topdeps b/.topdeps index df7c3c6e56..180b47c18b 100644 --- a/.topdeps +++ b/.topdeps @@ -1 +1 @@ -9a869d822025be8e43b78234997b10bf0cf9d859 +baseline diff --git a/.topmsg b/.topmsg index dd6634c886..93c5cdd52b 100644 --- a/.topmsg +++ b/.topmsg @@ -1,16 +1,5 @@ -Subject: Baseline for our topic branches. +Make _hurd_raise_signal return errors ---- - -This need not strictly be a TopGit branch, but it is for easy synchronization -between different machines. - -As the baseline is merged into the topic branches, it is forward-only. - -To advance it: - - $ echo [SHA1] > .topdeps - $ git commit -m Advance. -- .topdeps - $ tg update - ---- +* hurd/hurd-raise.c (_hurd_raise_signal): Set errno to error returned +by __msg_sig_post. +* hurd/hurd/signal.h (_hurd_raise_signal): Add int return type. -- cgit v1.2.3 From d8be6ec46e17526da4588635f51e260e8de5daa0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Oct 2015 16:21:41 +0200 Subject: Make _hurd_raise_signal return errors * hurd/hurd-raise.c (_hurd_raise_signal): Set errno to error returned by __msg_sig_post. * hurd/hurd/signal.h (_hurd_raise_signal): Add int return type. --- hurd/hurd-raise.c | 8 ++++++-- hurd/hurd/signal.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hurd/hurd-raise.c b/hurd/hurd-raise.c index 23e5dd6974..94abedfc12 100644 --- a/hurd/hurd-raise.c +++ b/hurd/hurd-raise.c @@ -24,10 +24,12 @@ If SS is not NULL it is the sigstate for the calling thread; SS->lock is held on entry and released before return. */ -void +int _hurd_raise_signal (struct hurd_sigstate *ss, int signo, const struct hurd_signal_detail *detail) { + error_t err; + if (ss == NULL) { ss = _hurd_self_sigstate (); @@ -46,5 +48,7 @@ _hurd_raise_signal (struct hurd_sigstate *ss, already marked the signal as pending for the particular thread we want. Generating the signal with an RPC might deliver it to some other thread. */ - __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); + err = __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); + + return __hurd_fail(err); } diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h index 8355d67ff3..9798681853 100644 --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h @@ -234,8 +234,8 @@ extern void _hurdsig_fault_init (void); sigstate SS points to. If SS is a null pointer, this instead affects the calling thread. */ -extern void _hurd_raise_signal (struct hurd_sigstate *ss, int signo, - const struct hurd_signal_detail *detail); +extern int _hurd_raise_signal (struct hurd_sigstate *ss, int signo, + const struct hurd_signal_detail *detail); /* Translate a Mach exception into a signal (machine-dependent). */ -- cgit v1.2.3