Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump Remove the "host" signal model. I'm not sure it ev...



details:   https://anonhg.NetBSD.org/src/rev/e823d72af4f3
branches:  trunk
changeset: 793572:e823d72af4f3
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 20 00:41:05 2014 +0000

description:
Remove the "host" signal model.  I'm not sure it ever made any sense.
I'm also quite sure nobody ever really wanted to use it.

Change the "raise" sigmodel to include the rump kernel PID in the call
to rumpuser_kill().  The purpose is to provide some hint for non-POSIX
platforms which don't sport signals and multiplex many clients in a
single address space.

While this is technically an ABI change, see above.  Also, since
rumpuser_kill() was not documented, I'll just claim I'm fixing a bug in
the implementation (and will be sure to document the interface correctly
very soon).

diffstat:

 sys/rump/include/rump/rump.h        |   4 ++--
 sys/rump/librump/rumpkern/signals.c |  23 ++++++++---------------
 2 files changed, 10 insertions(+), 17 deletions(-)

diffs (82 lines):

diff -r 44e8fe530ddf -r e823d72af4f3 sys/rump/include/rump/rump.h
--- a/sys/rump/include/rump/rump.h      Thu Feb 20 00:29:03 2014 +0000
+++ b/sys/rump/include/rump/rump.h      Thu Feb 20 00:41:05 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.h,v 1.57 2013/07/16 20:17:06 pooka Exp $  */
+/*     $NetBSD: rump.h,v 1.58 2014/02/20 00:41:05 pooka Exp $  */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -71,7 +71,7 @@
 enum rump_sigmodel {
        RUMP_SIGMODEL_PANIC,
        RUMP_SIGMODEL_IGNORE,
-       RUMP_SIGMODEL_HOST,
+       RUMP_SIGMODEL__HOST_NOTANYMORE,
        RUMP_SIGMODEL_RAISE,
        RUMP_SIGMODEL_RECORD
 };
diff -r 44e8fe530ddf -r e823d72af4f3 sys/rump/librump/rumpkern/signals.c
--- a/sys/rump/librump/rumpkern/signals.c       Thu Feb 20 00:29:03 2014 +0000
+++ b/sys/rump/librump/rumpkern/signals.c       Thu Feb 20 00:41:05 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $    */
+/*     $NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $       */
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -84,15 +84,6 @@
        return;
 }
 
-/* RUMP_SIGMODEL_HOST */
-
-static void
-rumpsig_host(struct proc *p, int signo)
-{
-
-       rumpuser_kill(p->p_pid, signo);
-}
-
 /* RUMP_SIGMODEL_RAISE */
 
 static void
@@ -100,7 +91,7 @@
 {
 
        if (RUMP_LOCALPROC_P(p)) {
-               rumpuser_kill(RUMPUSER_PID_SELF, signo);
+               rumpuser_kill(p->p_pid, signo);
        } else {
                rumpuser_sp_raise(p->p_vmspace->vm_map.pmap, signo);
        }
@@ -139,15 +130,17 @@
        case RUMP_SIGMODEL_IGNORE:
                rumpsig = rumpsig_ignore;
                break;
-       case RUMP_SIGMODEL_HOST:
-               rumpsig = rumpsig_host;
-               break;
        case RUMP_SIGMODEL_RAISE:
                rumpsig = rumpsig_raise;
                break;
        case RUMP_SIGMODEL_RECORD:
                rumpsig = rumpsig_record;
                break;
+
+       /* for compat, though I doubt anyone is using it */
+       case RUMP_SIGMODEL__HOST_NOTANYMORE:
+               rumpsig = rumpsig_raise;
+               break;
        }
 }
 



Home | Main Index | Thread Index | Old Index