PERFORCE change 147906 for review
Ed Schouten
ed at FreeBSD.org
Wed Aug 20 09:41:11 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=147906
Change 147906 by ed at ed_dull on 2008/08/20 09:41:00
Also IFC the TTY userspace changes.
Affected files ...
.. //depot/projects/mpsafetty/ObsoleteFiles.inc#7 integrate
.. //depot/projects/mpsafetty/UPDATING#7 integrate
.. //depot/projects/mpsafetty/bin/sh/miscbltin.c#3 integrate
.. //depot/projects/mpsafetty/etc/defaults/devfs.rules#2 integrate
.. //depot/projects/mpsafetty/etc/login.conf#3 integrate
.. //depot/projects/mpsafetty/lib/libc/stdlib/Makefile.inc#3 integrate
.. //depot/projects/mpsafetty/lib/libc/stdlib/Symbol.map#2 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/Makefile.inc#2 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/Symbol.map#3 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/getrlimit.2#3 integrate
.. //depot/projects/mpsafetty/lib/libutil/login.conf.5#5 integrate
.. //depot/projects/mpsafetty/lib/libutil/login_class.c#4 integrate
.. //depot/projects/mpsafetty/share/man/man4/Makefile#7 integrate
.. //depot/projects/mpsafetty/share/man/man4/ddb.4#6 integrate
.. //depot/projects/mpsafetty/share/man/man4/pty.4#5 integrate
.. //depot/projects/mpsafetty/share/man/man4/termios.4#4 integrate
.. //depot/projects/mpsafetty/sys/dev/xen/blkfront/blkfront.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/xen/console/console.c#6 integrate
.. //depot/projects/mpsafetty/sys/dev/xen/netfront/netfront.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/machdep.c#5 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/vm_machdep.c#3 integrate
.. //depot/projects/mpsafetty/sys/i386/include/cpufunc.h#4 integrate
.. //depot/projects/mpsafetty/sys/i386/xen/xen_machdep.c#5 integrate
.. //depot/projects/mpsafetty/sys/kern/init_main.c#4 integrate
.. //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_client.c#3 integrate
.. //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_probe.c#4 integrate
.. //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_xs.c#4 integrate
.. //depot/projects/mpsafetty/usr.bin/fstat/fstat.c#4 integrate
.. //depot/projects/mpsafetty/usr.bin/procstat/procstat.1#4 integrate
.. //depot/projects/mpsafetty/usr.bin/procstat/procstat_files.c#3 integrate
.. //depot/projects/mpsafetty/usr.sbin/pstat/pstat.8#3 integrate
.. //depot/projects/mpsafetty/usr.sbin/pstat/pstat.c#6 integrate
Differences ...
==== //depot/projects/mpsafetty/ObsoleteFiles.inc#7 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.154 2008/07/25 12:37:46 ed Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.155 2008/08/20 08:31:58 ed Exp $
#
# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
# directories (OLD_DIRS) which should get removed at an update. Recently
==== //depot/projects/mpsafetty/UPDATING#7 (text+ko) ====
@@ -1108,4 +1108,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.538 2008/08/18 10:38:16 ed Exp $
+$FreeBSD: src/UPDATING,v 1.539 2008/08/20 08:31:58 ed Exp $
==== //depot/projects/mpsafetty/bin/sh/miscbltin.c#3 (text+ko) ====
@@ -36,7 +36,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/miscbltin.c,v 1.35 2006/02/04 14:37:50 schweikh Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/miscbltin.c,v 1.36 2008/08/20 08:31:58 ed Exp $");
/*
* Miscellaneous builtins.
==== //depot/projects/mpsafetty/etc/defaults/devfs.rules#2 (text+ko) ====
@@ -13,7 +13,7 @@
# references must include a dollar sign '$' in front of the
# name to be expanded properly.
#
-# $FreeBSD: src/etc/defaults/devfs.rules,v 1.5 2007/10/12 14:55:41 csjp Exp $
+# $FreeBSD: src/etc/defaults/devfs.rules,v 1.6 2008/08/20 08:31:58 ed Exp $
#
# Very basic and secure ruleset: Hide everything.
==== //depot/projects/mpsafetty/etc/login.conf#3 (text+ko) ====
@@ -7,7 +7,7 @@
# This file controls resource limits, accounting limits and
# default user environment settings.
#
-# $FreeBSD: src/etc/login.conf,v 1.51 2007/05/29 06:37:57 dougb Exp $
+# $FreeBSD: src/etc/login.conf,v 1.52 2008/08/20 08:31:58 ed Exp $
#
# Default settings effectively disable resource limits, see the
==== //depot/projects/mpsafetty/lib/libc/stdlib/Makefile.inc#3 (text+ko) ====
@@ -1,5 +1,5 @@
# from @(#)Makefile.inc 8.3 (Berkeley) 2/4/95
-# $FreeBSD: src/lib/libc/stdlib/Makefile.inc,v 1.54 2007/07/04 00:00:39 scf Exp $
+# $FreeBSD: src/lib/libc/stdlib/Makefile.inc,v 1.55 2008/08/20 08:31:58 ed Exp $
# machine-independent stdlib sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/stdlib ${.CURDIR}/stdlib
==== //depot/projects/mpsafetty/lib/libc/stdlib/Symbol.map#2 (text) ====
@@ -1,5 +1,5 @@
/*
- * $FreeBSD: src/lib/libc/stdlib/Symbol.map,v 1.7 2008/06/17 14:05:03 ed Exp $
+ * $FreeBSD: src/lib/libc/stdlib/Symbol.map,v 1.8 2008/08/20 08:31:58 ed Exp $
*/
FBSD_1.0 {
==== //depot/projects/mpsafetty/lib/libc/sys/Makefile.inc#2 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
-# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.136 2008/05/09 23:09:56 julian Exp $
+# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.137 2008/08/20 08:31:58 ed Exp $
# sys sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys
==== //depot/projects/mpsafetty/lib/libc/sys/Symbol.map#3 (text) ====
@@ -1,5 +1,5 @@
/*
- * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.17 2008/07/11 15:17:06 brooks Exp $
+ * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.18 2008/08/20 08:31:58 ed Exp $
*/
/*
==== //depot/projects/mpsafetty/lib/libc/sys/getrlimit.2#3 (text+ko) ====
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)getrlimit.2 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/getrlimit.2,v 1.24 2007/01/09 00:28:14 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/getrlimit.2,v 1.25 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd June 13, 2004
+.Dd August 20, 2008
.Dt GETRLIMIT 2
.Os
.Sh NAME
==== //depot/projects/mpsafetty/lib/libutil/login.conf.5#5 (text+ko) ====
@@ -17,9 +17,9 @@
.\" 5. Modifications may be freely made to this file providing the above
.\" conditions are met.
.\"
-.\" $FreeBSD: src/lib/libutil/login.conf.5,v 1.61 2008/07/25 19:58:14 brooks Exp $
+.\" $FreeBSD: src/lib/libutil/login.conf.5,v 1.62 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd October 9, 2006
+.Dd August 20, 2008
.Dt LOGIN.CONF 5
.Os
.Sh NAME
==== //depot/projects/mpsafetty/lib/libutil/login_class.c#4 (text+ko) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/login_class.c,v 1.26 2008/07/25 19:58:14 brooks Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/login_class.c,v 1.27 2008/08/20 08:31:58 ed Exp $");
#include <sys/types.h>
#include <sys/param.h>
==== //depot/projects/mpsafetty/share/man/man4/Makefile#7 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/18/93
-# $FreeBSD: src/share/man/man4/Makefile,v 1.425 2008/08/19 23:06:21 rpaulo Exp $
+# $FreeBSD: src/share/man/man4/Makefile,v 1.426 2008/08/20 08:31:58 ed Exp $
MAN= aac.4 \
acpi.4 \
==== //depot/projects/mpsafetty/share/man/man4/ddb.4#6 (text+ko) ====
@@ -58,9 +58,9 @@
.\" Created.
.\" [90/08/30 dbg]
.\"
-.\" $FreeBSD: src/share/man/man4/ddb.4,v 1.56 2008/08/03 14:14:43 rwatson Exp $
+.\" $FreeBSD: src/share/man/man4/ddb.4,v 1.57 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd July 21, 2008
+.Dd August 20, 2008
.Dt DDB 4
.Os
.Sh NAME
==== //depot/projects/mpsafetty/share/man/man4/pty.4#5 (text+ko) ====
@@ -25,19 +25,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" Portions of this text are reprinted and reproduced in electronic form
-.\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology --
-.\" Portable Operating System Interface (POSIX), The Open Group Base
-.\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
-.\" Electrical and Electronics Engineers, Inc and The Open Group. In the
-.\" event of any discrepancy between this version and the original IEEE and
-.\" The Open Group Standard, the original IEEE and The Open Group Standard is
-.\" the referee document. The original Standard can be obtained online at
-.\" http://www.opengroup.org/unix/online.html.
+.\" $FreeBSD: src/share/man/man4/pty.4,v 1.20 2008/08/20 08:31:58 ed Exp $
.\"
-.\" $FreeBSD$
-.\"
-.Dd Mar 31, 2008
+.Dd August 20, 2008
.Dt PTY 4
.Os
.Sh NAME
==== //depot/projects/mpsafetty/share/man/man4/termios.4#4 (text+ko) ====
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)termios.4 8.4 (Berkeley) 4/19/94
-.\" $FreeBSD: src/share/man/man4/termios.4,v 1.33 2008/05/13 21:51:35 remko Exp $
+.\" $FreeBSD: src/share/man/man4/termios.4,v 1.34 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd May 13, 2008
+.Dd August 20, 2008
.Dt TERMIOS 4
.Os
.Sh NAME
==== //depot/projects/mpsafetty/sys/dev/xen/blkfront/blkfront.c#3 (text+ko) ====
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/xen/blkfront/blkfront.c,v 1.2 2008/08/17 23:33:33 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/xen/blkfront/blkfront.c,v 1.3 2008/08/20 09:22:37 kmacy Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -482,7 +482,8 @@
info->connected = BLKIF_STATE_CONNECTED;
kick_pending_request_queues(info);
mtx_unlock(&blkif_io_lock);
-
+ info->is_ready = 1;
+
#if 0
add_disk(info->gd);
#endif
==== //depot/projects/mpsafetty/sys/dev/xen/console/console.c#6 (text+ko) ====
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/xen/console/console.c,v 1.2 2008/08/15 04:00:44 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/xen/console/console.c,v 1.3 2008/08/20 09:03:03 ed Exp $");
#include <sys/param.h>
#include <sys/module.h>
==== //depot/projects/mpsafetty/sys/dev/xen/netfront/netfront.c#2 (text+ko) ====
@@ -18,7 +18,7 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/xen/netfront/netfront.c,v 1.1 2008/08/12 20:01:57 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/xen/netfront/netfront.c,v 1.3 2008/08/20 09:11:58 kmacy Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,7 +53,7 @@
#include <machine/bus.h>
#include <machine/resource.h>
#include <machine/frame.h>
-
+#include <machine/vmparam.h>
#include <sys/bus.h>
#include <sys/rman.h>
@@ -1816,7 +1816,8 @@
xenbus_register_frontend(&netfront);
}
-SYSINIT(xennetif, SI_SUB_PSEUDO, SI_ORDER_ANY, netif_init, NULL)
+SYSINIT(xennetif, SI_SUB_PSEUDO, SI_ORDER_SECOND, netif_init, NULL);
+
/*
* Local variables:
==== //depot/projects/mpsafetty/sys/i386/i386/machdep.c#5 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.673 2008/08/20 03:28:32 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.674 2008/08/20 09:16:46 kmacy Exp $");
#include "opt_apic.h"
#include "opt_atalk.h"
@@ -2373,8 +2373,8 @@
}
if (envmode == 1)
kern_envp = static_env;
- else if (bootinfo.bi_envp)
- kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE;
+ else if ((caddr_t)xen_start_info->cmd_line)
+ kern_envp = xen_setbootenv((caddr_t)xen_start_info->cmd_line);
boothowto |= xen_boothowto(kern_envp);
==== //depot/projects/mpsafetty/sys/i386/i386/vm_machdep.c#3 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.287 2008/08/15 20:51:31 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.288 2008/08/20 09:16:46 kmacy Exp $");
#include "opt_isa.h"
#include "opt_npx.h"
@@ -270,8 +270,11 @@
/*
* XXX XEN need to check on PSL_USER is handled
*/
+#ifndef XEN
+ td2->td_md.md_saved_flags = 0;
+#else
td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
-
+#endif
/*
* Now, cpu_switch() can schedule the new process.
* pcb_esp is loaded pointing to the cpu_switch() stack frame
@@ -439,7 +442,11 @@
/* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
+#ifdef XEN
+ td->td_md.md_saved_flags = 0;
+#else
td->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
+#endif
}
/*
==== //depot/projects/mpsafetty/sys/i386/include/cpufunc.h#4 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.148 2008/08/15 20:51:31 kmacy Exp $
+ * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.149 2008/08/20 09:16:46 kmacy Exp $
*/
/*
@@ -48,7 +48,7 @@
extern void xen_load_cr3(u_int data);
extern void xen_tlb_flush(void);
extern void xen_invlpg(u_int addr);
-extern void xen_save_and_cli(u_int *eflags);
+extern int xen_save_and_cli(void);
extern void xen_restore_flags(u_int eflags);
#endif
@@ -690,10 +690,10 @@
static __inline register_t
intr_disable(void)
{
- register_t eflags = 0;
+ register_t eflags;
#ifdef XEN
- xen_save_and_cli(&eflags);
+ eflags = xen_save_and_cli();
#else
eflags = read_eflags();
disable_intr();
==== //depot/projects/mpsafetty/sys/i386/xen/xen_machdep.c#5 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/xen/xen_machdep.c,v 1.5 2008/08/19 02:39:34 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/xen/xen_machdep.c,v 1.6 2008/08/20 09:16:46 kmacy Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -344,11 +344,13 @@
__restore_flags(eflags);
}
-void
-xen_save_and_cli(u_int *eflags)
+int
+xen_save_and_cli(void)
{
-
- __save_and_cli((*eflags));
+ int eflags;
+
+ __save_and_cli(eflags);
+ return (eflags);
}
void
@@ -1141,7 +1143,10 @@
};
-static void
+void setup_shutdown_watcher(void *unused);
+
+
+void
setup_shutdown_watcher(void *unused)
{
if (register_xenbus_watch(&shutdown_watch))
@@ -1149,7 +1154,7 @@
}
-SYSINIT(shutdown, SI_SUB_PSEUDO, SI_ORDER_ANY, setup_shutdown_watcher, NULL);
+SYSINIT(shutdown, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, setup_shutdown_watcher, NULL);
#ifdef notyet
==== //depot/projects/mpsafetty/sys/kern/init_main.c#4 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.294 2008/08/20 08:31:58 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.295 2008/08/20 09:21:24 kmacy Exp $");
#include "opt_ddb.h"
#include "opt_init_path.h"
@@ -592,8 +592,6 @@
SYSCTL_INT(_kern, OID_AUTO, init_shutdown_timeout,
CTLFLAG_RW, &init_shutdown_timeout, 0, "");
-int scheduler_running = 0;
-
/*
* Start the initial user process; try exec'ing each pathname in init_path.
* The program is invoked with one argument containing the boot flags.
@@ -609,7 +607,6 @@
struct thread *td;
struct proc *p;
- scheduler_running = 1;
mtx_lock(&Giant);
GIANT_REQUIRED;
==== //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_client.c#3 (text+ko) ====
@@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_client.c,v 1.2 2008/08/15 04:00:44 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_client.c,v 1.3 2008/08/20 09:20:12 kmacy Exp $");
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -55,6 +55,21 @@
#define kfree(ptr) free(ptr, M_DEVBUF)
#define BUG_ON PANIC_IF
+
+const char *xenbus_strstate(XenbusState state)
+{
+ static const char *const name[] = {
+ [ XenbusStateUnknown ] = "Unknown",
+ [ XenbusStateInitialising ] = "Initialising",
+ [ XenbusStateInitWait ] = "InitWait",
+ [ XenbusStateInitialised ] = "Initialised",
+ [ XenbusStateConnected ] = "Connected",
+ [ XenbusStateClosing ] = "Closing",
+ [ XenbusStateClosed ] = "Closed",
+ };
+ return (state < (XenbusStateClosed + 1)) ? name[state] : "INVALID";
+}
+
int
xenbus_watch_path(struct xenbus_device *dev, char *path,
struct xenbus_watch *watch,
==== //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_probe.c#4 (text+ko) ====
@@ -35,7 +35,7 @@
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_probe.c,v 1.3 2008/08/20 02:42:08 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_probe.c,v 1.4 2008/08/20 09:20:12 kmacy Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -956,10 +956,13 @@
}
#endif
+
+static int dom0 = 0;
+
static int
xenbus_probe_sysinit(void *unused)
{
- int err = 0, dom0;
+ int err = 0;
DPRINTK("");
@@ -1031,6 +1034,13 @@
return err;
}
+ return 0;
+}
+
+
+static int
+xenbus_probe_sysinit2(void *unused)
+{
if (!dom0) {
xenstored_ready = 1;
#if 0
@@ -1048,18 +1058,18 @@
/* Enumerate devices in xenstore. */
xenbus_probe_devices(&xenbus_frontend);
register_xenbus_watch(&fe_watch);
-#ifdef notyet
xenbus_backend_probe_and_watch();
-#endif
/* Notify others that xenstore is up */
EVENTHANDLER_INVOKE(xenstore_event);
}
-
- return 0;
+ return (0);
}
+
SYSINIT(xenbus_probe_sysinit, SI_SUB_PSEUDO, SI_ORDER_FIRST, xenbus_probe_sysinit, NULL);
+SYSINIT(xenbus_probe_sysinit2, SI_SUB_PSEUDO, SI_ORDER_ANY,
+ xenbus_probe_sysinit2, NULL);
#if 0
static device_method_t xenbus_methods[] = {
==== //depot/projects/mpsafetty/sys/xen/xenbus/xenbus_xs.c#4 (text+ko) ====
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_xs.c,v 1.4 2008/08/20 03:27:12 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/xen/xenbus/xenbus_xs.c,v 1.5 2008/08/20 09:20:12 kmacy Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -313,6 +313,8 @@
wmsg->u.watch.handle,
(const char **)wmsg->u.watch.vec,
wmsg->u.watch.vec_size);
+ kfree(wmsg->u.watch.vec);
+ kfree(wmsg);
}
}
BUG_ON(msg.type != type);
@@ -610,8 +612,12 @@
{
va_list ap;
const char *name;
- int ret = 0;
+ int i, ret = 0;
+ for (i = 0; i < 10000; i++)
+ HYPERVISOR_yield();
+
+ printf("gather ");
va_start(ap, dir);
while (ret == 0 && (name = va_arg(ap, char *)) != NULL) {
const char *fmt = va_arg(ap, char *);
@@ -623,6 +629,7 @@
ret = PTR_ERR(p);
break;
}
+ printf(" %s ", p);
if (fmt) {
if (sscanf(p, fmt, result) == 0)
ret = -EINVAL;
@@ -631,6 +638,7 @@
*(char **)result = p;
}
va_end(ap);
+ printf("\n");
return ret;
}
EXPORT_SYMBOL(xenbus_gather);
@@ -772,12 +780,14 @@
{
struct xs_stored_msg *msg;
+ DELAY(10000);
xenwatch_running = 1;
for (;;) {
while (list_empty(&watch_events))
- pause("xenwatch", hz/10);
-
+ tsleep(&watch_events_waitq,
+ PWAIT | PCATCH, "waitev", hz/10);
+
sx_xlock(&xenwatch_mutex);
mtx_lock(&watch_events_lock);
@@ -787,7 +797,7 @@
mtx_unlock(&watch_events_lock);
if (msg != NULL) {
-
+ printf("handling watch\n");
msg->u.watch.handle->callback(
msg->u.watch.handle,
(const char **)msg->u.watch.vec,
@@ -845,8 +855,7 @@
if (msg->u.watch.handle != NULL) {
mtx_lock(&watch_events_lock);
TAILQ_INSERT_TAIL(&watch_events, msg, list);
- if (xenwatch_running)
- wakeup(&watch_events_waitq);
+ wakeup(&watch_events_waitq);
mtx_unlock(&watch_events_lock);
} else {
kfree(msg->u.watch.vec);
@@ -858,9 +867,8 @@
msg->u.reply.body = body;
mtx_lock(&xs_state.reply_lock);
TAILQ_INSERT_TAIL(&xs_state.reply_list, msg, list);
+ wakeup(&xs_state.reply_waitq);
mtx_unlock(&xs_state.reply_lock);
- if (xenbus_running)
- wakeup(&xs_state.reply_waitq);
}
if (*type == XS_WATCH_EVENT)
printf("\n");
@@ -873,6 +881,7 @@
int err;
enum xsd_sockmsg_type type;
+ DELAY(10000);
xenbus_running = 1;
pause("xenbus", hz/10);
==== //depot/projects/mpsafetty/usr.bin/fstat/fstat.c#4 (text+ko) ====
@@ -43,7 +43,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/fstat/fstat.c,v 1.69 2008/06/16 17:34:59 kib Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/fstat/fstat.c,v 1.70 2008/08/20 08:31:58 ed Exp $");
#include <sys/param.h>
#include <sys/time.h>
==== //depot/projects/mpsafetty/usr.bin/procstat/procstat.1#4 (text+ko) ====
@@ -23,9 +23,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/usr.bin/procstat/procstat.1,v 1.5 2008/07/28 08:01:24 ed Exp $
+.\" $FreeBSD: src/usr.bin/procstat/procstat.1,v 1.6 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd April 19, 2008
+.Dd August 20, 2008
.Dt PROCSTAT 1
.Os
.Sh NAME
==== //depot/projects/mpsafetty/usr.bin/procstat/procstat_files.c#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/usr.bin/procstat/procstat_files.c,v 1.6 2008/06/27 05:39:04 jhb Exp $
+ * $FreeBSD: src/usr.bin/procstat/procstat_files.c,v 1.7 2008/08/20 08:31:58 ed Exp $
*/
#include <sys/types.h>
==== //depot/projects/mpsafetty/usr.sbin/pstat/pstat.8#3 (text+ko) ====
@@ -33,9 +33,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)pstat.8 8.5 (Berkeley) 5/13/94
-.\" $FreeBSD: src/usr.sbin/pstat/pstat.8,v 1.49 2007/04/03 08:16:05 ru Exp $
+.\" $FreeBSD: src/usr.sbin/pstat/pstat.8,v 1.50 2008/08/20 08:31:58 ed Exp $
.\"
-.Dd April 1, 2007
+.Dd August 20, 2008
.Dt PSTAT 8
.Os
.Sh NAME
==== //depot/projects/mpsafetty/usr.sbin/pstat/pstat.c#6 (text+ko) ====
@@ -46,7 +46,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/pstat/pstat.c,v 1.104 2008/07/16 11:20:04 ed Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/pstat/pstat.c,v 1.105 2008/08/20 08:31:58 ed Exp $");
#include <sys/param.h>
#include <sys/time.h>
More information about the p4-projects
mailing list