@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.40 2009/01/30 02:30:03 pooka Exp $
+# $NetBSD: Makefile.rumpkern,v 1.41 2009/03/18 17:56:15 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -27,10 +27,10 @@
# Rest are from the std kernel sources.
#
# sys/kern
-SRCS+= kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c \
- kern_module.c kern_rate.c kern_stub.c kern_sysctl.c \
- kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \
- sys_generic.c
+SRCS+= kern_auth.c kern_descrip.c kern_event.c kern_ksyms.c \
+ kern_malloc_stdtype.c kern_module.c kern_rate.c kern_stub.c \
+ kern_sysctl.c kern_timeout.c kern_uidinfo.c param.c \
+ sys_descrip.c sys_generic.c
# sys/kern subr (misc)
SRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \
@@ -1,4 +1,4 @@
-/* $NetBSD: emul.c,v 1.80 2009/03/18 10:22:44 cegger Exp $ */
+/* $NetBSD: emul.c,v 1.81 2009/03/18 17:56:15 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.80 2009/03/18 10:22:44 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.81 2009/03/18 17:56:15 pooka Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -101,6 +101,7 @@
int domainnamelen;
const struct filterops seltrue_filtops;
+const struct filterops sig_filtops;
#define DEVSW_SIZE 255
const struct bdevsw *bdevsw0[DEVSW_SIZE]; /* XXX storage size */
@@ -154,6 +155,16 @@
}
int
+copyoutstr(const void *kaddr, void *uaddr, size_t len, size_t *done)
+{
+
+ strlcpy(uaddr, kaddr, len);
+ if (done)
+ *done = strlen(uaddr)+1; /* includes termination */
+ return 0;
+}
+
+int
copyin_vmspace(struct vmspace *vm, const void *uaddr, void *kaddr, size_t len)
{
@@ -493,21 +504,7 @@
panic("%s: not implemented", __func__);
}
-void
-knote_fdclose(int fd)
-{
-
- /* since we don't add knotes, we don't have to remove them */
-}
-
int
-seltrue_kqfilter(dev_t dev, struct knote *kn)
-{
-
- panic("%s: not implemented", __func__);
-}
-
-int
kpause(const char *wmesg, bool intr, int timeo, kmutex_t *mtx)
{
extern int hz;
@@ -710,3 +707,36 @@
#undef curlwp
struct lwp *curlwp = &lwp0;
#endif
+
+/*
+ * XXX: from sys_select.c, see that file for license.
+ * (these will go away really soon in favour of the real sys_select.c)
+ * ((really, the select code just needs cleanup))
+ * (((seriously)))
+ */
+int
+inittimeleft(struct timeval *tv, struct timeval *sleeptv)
+{
+ if (itimerfix(tv))
+ return -1;
+ getmicrouptime(sleeptv);
+ return 0;
+}
+
+int
+gettimeleft(struct timeval *tv, struct timeval *sleeptv)
+{
+ /*
+ * We have to recalculate the timeout on every retry.
+ */
+ struct timeval slepttv;
+ /*
+ * reduce tv by elapsed time
+ * based on monotonic time scale
+ */
+ getmicrouptime(&slepttv);
+ timeradd(tv, sleeptv, tv);
+ timersub(tv, &slepttv, tv);
+ *sleeptv = slepttv;
+ return tvtohz(tv);
+}
@@ -1,4 +1,4 @@
-/* $NetBSD: misc_stub.c,v 1.18 2009/03/18 10:22:44 cegger Exp $ */
+/* $NetBSD: misc_stub.c,v 1.19 2009/03/18 17:56:15 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: misc_stub.c,v 1.18 2009/03/18 10:22:44 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: misc_stub.c,v 1.19 2009/03/18 17:56:15 pooka Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -64,13 +64,6 @@
{
/* see yield */
- return;
-}
-
-void
-knote(struct klist *list, long hint)
-{
-
return;
}