Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser Just abort on currently unsupported functions.



details:   https://anonhg.NetBSD.org/src/rev/add8aac956b2
branches:  trunk
changeset: 335200:add8aac956b2
user:      justin <justin%NetBSD.org@localhost>
date:      Mon Dec 29 21:50:09 2014 +0000

description:
Just abort on currently unsupported functions.

diffstat:

 lib/librumpuser/rumpfiber.c    |  14 ++++++++++++--
 lib/librumpuser/rumpfiber.h    |  12 +-----------
 lib/librumpuser/rumpfiber_sp.c |  22 ++++++++--------------
 3 files changed, 21 insertions(+), 27 deletions(-)

diffs (137 lines):

diff -r 0ca1577494b7 -r add8aac956b2 lib/librumpuser/rumpfiber.c
--- a/lib/librumpuser/rumpfiber.c       Mon Dec 29 19:51:53 2014 +0000
+++ b/lib/librumpuser/rumpfiber.c       Mon Dec 29 21:50:09 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfiber.c,v 1.8 2014/11/08 23:47:15 justin Exp $     */
+/*     $NetBSD: rumpfiber.c,v 1.9 2014/12/29 21:50:09 justin Exp $     */
 
 /*
  * Copyright (c) 2007-2013 Antti Kantee.  All Rights Reserved.
@@ -68,7 +68,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpfiber.c,v 1.8 2014/11/08 23:47:15 justin Exp $");
+__RCSID("$NetBSD: rumpfiber.c,v 1.9 2014/12/29 21:50:09 justin Exp $");
 #endif /* !lint */
 
 #include <sys/ioctl.h>
@@ -108,6 +108,16 @@
 
 static void (*scheduler_hook)(void *, void *);
 
+static void printk(const char *s);
+
+static void
+printk(const char *msg)
+{
+       int ret __attribute__((unused));
+
+       ret = write(2, msg, strlen(msg));
+}
+
 static struct thread *
 get_current(void)
 {
diff -r 0ca1577494b7 -r add8aac956b2 lib/librumpuser/rumpfiber.h
--- a/lib/librumpuser/rumpfiber.h       Mon Dec 29 19:51:53 2014 +0000
+++ b/lib/librumpuser/rumpfiber.h       Mon Dec 29 21:50:09 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfiber.h,v 1.2 2014/08/24 14:37:31 pooka Exp $      */
+/*     $NetBSD: rumpfiber.h,v 1.3 2014/12/29 21:50:09 justin Exp $     */
 
 /*
  * Copyright (c) 2014 Justin Cormack.  All Rights Reserved.
@@ -33,16 +33,6 @@
 #include <ucontext.h>
 #include <unistd.h>
 
-static void printk(const char *s);
-
-static void
-printk(const char *msg)
-{
-       int ret __attribute__((unused));
-
-       ret = write(2, msg, strlen(msg));
-}
-
 struct thread {
     char *name;
     void *lwp;
diff -r 0ca1577494b7 -r add8aac956b2 lib/librumpuser/rumpfiber_sp.c
--- a/lib/librumpuser/rumpfiber_sp.c    Mon Dec 29 19:51:53 2014 +0000
+++ b/lib/librumpuser/rumpfiber_sp.c    Mon Dec 29 21:50:09 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfiber_sp.c,v 1.2 2014/08/24 14:37:31 pooka Exp $   */
+/*     $NetBSD: rumpfiber_sp.c,v 1.3 2014/12/29 21:50:09 justin Exp $  */
 
 /*
  * Copyright (c) 2014 Justin Cormack.  All Rights Reserved.
@@ -30,7 +30,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpfiber_sp.c,v 1.2 2014/08/24 14:37:31 pooka Exp $");
+__RCSID("$NetBSD: rumpfiber_sp.c,v 1.3 2014/12/29 21:50:09 justin Exp $");
 #endif /* !lint */
 
 #include <stdlib.h>
@@ -60,8 +60,7 @@
 rumpuser_sp_raise(void *arg, int signo)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_raise\n");
-       exit(1);
+       abort();
 }
 
 /*ARGSUSED*/
@@ -69,8 +68,7 @@
 rumpuser_sp_copyin(void *arg, const void *raddr, void *laddr, size_t len)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_copyin\n");
-       exit(1);
+       abort();
 }
 
 /*ARGSUSED*/
@@ -78,8 +76,7 @@
 rumpuser_sp_copyinstr(void *arg, const void *raddr, void *laddr, size_t *len)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_copyinstr\n");
-       exit(1);
+       abort();
 }
 
 /*ARGSUSED*/
@@ -87,8 +84,7 @@
 rumpuser_sp_copyout(void *arg, const void *laddr, void *raddr, size_t dlen)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_copyout\n");
-       exit(1);
+       abort();
 }
 
 /*ARGSUSED*/
@@ -96,8 +92,7 @@
 rumpuser_sp_copyoutstr(void *arg, const void *laddr, void *raddr, size_t *dlen)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_copyoutstr\n");
-       exit(1);
+       abort();
 }
 
 /*ARGSUSED*/
@@ -105,6 +100,5 @@
 rumpuser_sp_anonmmap(void *arg, size_t howmuch, void **addr)
 {
 
-       printk("rumphyper: unimplemented rumpuser_sp_anonmmap\n");
-       exit(1);
+       abort();
 }



Home | Main Index | Thread Index | Old Index