Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump Put nanosleep() and folks in librump instead of mai...
details: https://anonhg.NetBSD.org/src/rev/6d8e0f8b3934
branches: trunk
changeset: 795151:6d8e0f8b3934
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 02 19:37:17 2014 +0000
description:
Put nanosleep() and folks in librump instead of maintaining them in
the separate rumpkern_time component. Keeping time-related routines
elsewhere lead to some illogical behavior if you didn't think of linking
in rumpkern_time (hands up everyone who checks the return value of
nanosleep()).
Add warnings if rumpkern_time is linked or used. I'll remove it in a
month or two instead of now since it was part of a buildrump.sh snapshot
and it's nicer if trying to use it gives a warning instead of an error
in the next snapshot.
"everything should be as modular as possible, but no more modular than that"
diffstat:
sys/rump/kern/Makefile.rumpkerncomp | 4 ++--
sys/rump/kern/lib/Makefile | 5 ++++-
sys/rump/kern/lib/libtime/Makefile | 3 +--
sys/rump/kern/lib/libtime/time_component.c | 9 +++++----
sys/rump/librump/rumpkern/Makefile.rumpkern | 3 ++-
sys/rump/librump/rumpkern/rump.c | 19 +++++++++++++++++--
6 files changed, 31 insertions(+), 12 deletions(-)
diffs (138 lines):
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/kern/Makefile.rumpkerncomp
--- a/sys/rump/kern/Makefile.rumpkerncomp Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/kern/Makefile.rumpkerncomp Wed Apr 02 19:37:17 2014 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.rumpkerncomp,v 1.9 2014/03/14 01:02:34 pooka Exp $
+# $NetBSD: Makefile.rumpkerncomp,v 1.10 2014/04/02 19:37:17 pooka Exp $
#
.include <bsd.own.mk>
-RUMPKERNCOMPS= crypto time tty z
+RUMPKERNCOMPS= crypto tty z
.if ${MKSLJIT} != "no"
RUMPKERNCOMPS+= sljit
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/kern/lib/Makefile
--- a/sys/rump/kern/lib/Makefile Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/kern/lib/Makefile Wed Apr 02 19:37:17 2014 +0000
@@ -1,8 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2010/12/05 16:27:42 pooka Exp $
+# $NetBSD: Makefile,v 1.5 2014/04/02 19:37:17 pooka Exp $
#
.include "${.CURDIR}/../Makefile.rumpkerncomp"
SUBDIR+= ${RUMPKERNLIBS}
+# obsolete and going away soon
+SUBDIR+= libtime
+
.include <bsd.subdir.mk>
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/kern/lib/libtime/Makefile
--- a/sys/rump/kern/lib/libtime/Makefile Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/kern/lib/libtime/Makefile Wed Apr 02 19:37:17 2014 +0000
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2014/03/14 01:02:34 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2014/04/02 19:37:17 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../kern
LIB= rumpkern_time
-SRCS+= kern_time.c
SRCS+= time_component.c
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/kern/lib/libtime/time_component.c
--- a/sys/rump/kern/lib/libtime/time_component.c Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/kern/lib/libtime/time_component.c Wed Apr 02 19:37:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $ */
+/* $NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $ */
/*
* Copyright (c) 2014 Antti Kantee. All Rights Reserved.
@@ -26,16 +26,17 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $");
#include <sys/param.h>
#include <sys/timevar.h>
#include "rump_private.h"
+void rumpkern_time_is_obsolete(void);
+
RUMP_COMPONENT(RUMP_COMPONENT_KERN)
{
- time_init();
- time_init2();
+ rumpkern_time_is_obsolete();
}
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Apr 02 19:37:17 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.141 2014/03/15 15:22:42 pooka Exp $
+# $NetBSD: Makefile.rumpkern,v 1.142 2014/04/02 19:37:17 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -92,6 +92,7 @@
kern_syscall.c \
kern_sysctl.c \
kern_tc.c \
+ kern_time.c \
kern_timeout.c \
kern_uidinfo.c \
kern_xxx.c \
diff -r 1f6d9c56f0d8 -r 6d8e0f8b3934 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Wed Apr 02 18:09:10 2014 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Wed Apr 02 19:37:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.291 2014/03/20 20:42:08 christos Exp $ */
+/* $NetBSD: rump.c,v 1.292 2014/04/02 19:37:17 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.291 2014/03/20 20:42:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.292 2014/04/02 19:37:17 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -392,6 +392,8 @@
pipe_init();
resource_init();
procinit_sysctl();
+ time_init();
+ time_init2();
/* start page baroness */
if (rump_threads) {
@@ -1050,3 +1052,16 @@
return rv;
}
+
+/*
+ * Temporary notification that rumpkern_time is obsolete. This is to
+ * be removed along with obsoleting rumpkern_time in a few months.
+ */
+#define RUMPKERN_TIME_WARN "rumpkern_time is obsolete, functionality in librump"
+__warn_references(rumpkern_time_is_obsolete,RUMPKERN_TIME_WARN)
+void rumpkern_time_is_obsolete(void);
+void
+rumpkern_time_is_obsolete(void)
+{
+ printf("WARNING: %s\n", RUMPKERN_TIME_WARN);
+}
Home |
Main Index |
Thread Index |
Old Index