Index: /sys/config/TINDERBOX
===================================================================
RCS file: /cvs/src/sys/config/TINDERBOX,v
retrieving revision 1.22
diff -u -r1.22 TINDERBOX
--- /sys/config/TINDERBOX	19 Jan 2007 07:23:42 -0000	1.22
+++ /sys/config/TINDERBOX	10 Jun 2008 22:19:02 -0000
@@ -1,6 +1,6 @@
 # DragonFly BSD Tinderbox Configuration File
 #
-# $DragonFly: src/sys/config/TINDERBOX,v 1.22 2007/01/19 07:23:42 dillon Exp $
+# $DragonFly$
 
 platform	pc32
 machine		i386
@@ -203,8 +203,6 @@
 device		xe
 # Generic 802.11 stack, used by wi
 device         wlan
-# PRISM I IEEE 802.11b wireless NIC.
-device		awi
 # WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
 # exists only as a PCMCIA device, so there is no ISA attachment needed
 # and resources will always be dynamically assigned by the pccard code.
Index: /sys/config/VKERNEL
===================================================================
RCS file: /cvs/src/sys/config/VKERNEL,v
retrieving revision 1.12
diff -u -r1.12 VKERNEL
--- /sys/config/VKERNEL	3 Sep 2007 19:24:53 -0000	1.12
+++ /sys/config/VKERNEL	28 Jun 2008 00:10:34 -0000
@@ -1,6 +1,6 @@
 # VKERNEL - configuration for a virtual kernel
 #
-# $DragonFly: src/sys/config/VKERNEL,v 1.12 2007/09/03 19:24:53 pavalos Exp $
+# $DragonFly$
 
 platform	vkernel		# platform architecture (i386, vkernel, etc)
 machine		i386
@@ -15,17 +15,34 @@
 
 options		DEBUG_PCTRACK
 
+#options		NETGRAPH7
+
 options		KTR
 options		KTR_GIANT_CONTENTION
 options		KTR_SPIN_CONTENTION
+options		SUIDDIR
 #options	DEBUG_CRIT_SECTIONS
 
+#options	USERFS
+#options	SYSLINK
+options		HAMMER
 options		QUOTA
 options		DUMMYNET
 options         IPFIREWALL              #firewall
 options		IPFIREWALL_FORWARD      #enable transparent proxy support
 options		IPFIREWALL_DEFAULT_TO_ACCEPT    #allow everything by default
 
+# ALTQ
+options         ALTQ            #alternate queueing
+options         ALTQ_CBQ        #class based queueing
+options         ALTQ_RED        #random early detection
+options         ALTQ_RIO        #triple red for diffserv (needs RED)
+options         ALTQ_HFSC       #hierarchical fair service curve
+options         ALTQ_PRIQ       #priority queue
+options		ALTQ_FAIRQ	#fair queue
+#options        ALTQ_NOPCC      #don't use processor cycle counter
+options         ALTQ_DEBUG      #for debugging
+
 options		IPSEC			#IP security
 options		IPSEC_ESP		#IP security (crypto; define w/ IPSEC)
 options		IPSEC_DEBUG		#debug for IP security
@@ -64,6 +81,8 @@
 options 	DDB_TRACE
 options 	INVARIANTS
 
+options		CARP
+
 # Floating point support - do not disable.
 device		npx0	at nexus?
 
@@ -78,6 +97,8 @@
 pseudo-device	gif		# IPv6 and IPv4 tunneling
 pseudo-device	faith	1	# IPv6-to-IPv4 relaying (translation)
 
+pseudo-device	carp
+
 # The `bpf' pseudo-device enables the Berkeley Packet Filter.
 # Be aware of the administrative consequences of enabling this!
 pseudo-device	bpf		#Berkeley packet filter
@@ -87,4 +108,5 @@
 device		vn
 device		vkd
 device		vke
+
 device		vcd
Index: /sys/platform/pc32/isa/prof_machdep.c
===================================================================
RCS file: /cvs/src/sys/platform/pc32/isa/prof_machdep.c,v
retrieving revision 1.9
diff -u -r1.9 prof_machdep.c
--- /sys/platform/pc32/isa/prof_machdep.c	10 May 2008 17:24:09 -0000	1.9
+++ /sys/platform/pc32/isa/prof_machdep.c	14 Jun 2008 03:54:40 -0000
@@ -47,6 +47,7 @@
 
 #include <bus/isa/i386/isa.h>
 #include <machine_base/isa/timerreg.h>
+#include <sys/spinlock.h>
 
 #ifdef GUPROF
 #define	CPUTIME_CLOCK_UNINITIALIZED	0
@@ -65,6 +66,8 @@
 #endif
 #endif /* GUPROF */
 
+struct spinlock mcount_lock;
+
 #ifdef __GNUC__
 __asm("								\n\
 GM_STATE	=	0					\n\
@@ -92,8 +95,8 @@
  	jmp	.got_frompc					\n\
  								\n\
  	.p2align 4,0x90						\n\
- 	.globl	" __XSTRING(HIDENAME(mcount)) "			\n\
-" __XSTRING(HIDENAME(mcount)) ":				\n\
+ 	.globl	.mcount						\n\
+.mcount:							\n\
 	cmpl	$GMON_PROF_OFF," __XSTRING(CNAME(_gmonparam)) "+GM_STATE \n\
 	je	.mcount_exit					\n\
 	#							\n\
@@ -151,8 +154,8 @@
 GMON_PROF_HIRES	=	4					\n\
 								\n\
 	.p2align 4,0x90						\n\
-	.globl	" __XSTRING(HIDENAME(mexitcount)) "		\n\
-" __XSTRING(HIDENAME(mexitcount)) ":				\n\
+	.globl	.mexitcount					\n\
+.mexitcount:							\n\
 	cmpl	$GMON_PROF_HIRES," __XSTRING(CNAME(_gmonparam)) "+GM_STATE \n\
 	jne	.mexitcount_exit				\n\
 	pushl	%edx						\n\
@@ -351,8 +354,8 @@
 __asm("								\n\
 	.text							\n\
 	.p2align 4,0x90						\n\
-	.globl	" __XSTRING(HIDENAME(mexitcount)) "		\n\
-" __XSTRING(HIDENAME(mexitcount)) ":				\n\
+	.globl	.mexitcount					\n\
+.mexitcount:							\n\
 	ret							\n\
 ");
 #else /* !__GNUC__ */
Index: ./sys/conf/files
===================================================================
RCS file: /cvs/src/sys/conf/files,v
retrieving revision 1.217
diff -u -r1.217 files
--- ./sys/conf/files	10 Jun 2008 05:06:18 -0000	1.217
+++ ./sys/conf/files	11 Jun 2008 23:31:27 -0000
@@ -558,6 +558,7 @@
 kern/kern_subr.c	standard
 kern/kern_usched.c	standard
 kern/usched_bsd4.c	standard
+kern/usched_pshare.c	standard
 kern/usched_dummy.c	standard
 kern/kern_umtx.c	standard
 kern/lwkt_thread.c	standard
Index: ./sys/kern/kern_usched.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_usched.c,v
retrieving revision 1.9
diff -u -r1.9 kern_usched.c
--- ./sys/kern/kern_usched.c	2 Jul 2007 17:06:55 -0000	1.9
+++ ./sys/kern/kern_usched.c	30 Jun 2008 00:51:32 -0000
@@ -61,14 +61,26 @@
 	/*
 	 * Add various userland schedulers to the system.
 	 */
+	usched_ctl(&usched_pshare, USCH_ADD);
 	usched_ctl(&usched_bsd4, USCH_ADD);
 	usched_ctl(&usched_dummy, USCH_ADD);
+	
+
 	if (defsched == NULL )
-		return(&usched_bsd4);
+	{	kprintf("Running default scheduler\n");
+		return(&usched_pshare);
+	}
 	if (strcmp(defsched, "bsd4") == 0)
+	{	kprintf("Running BSD4 scheduler\n");
 		return(&usched_bsd4);
+	}
+	if (strcmp(defsched, "pshare") == 0)
+	{	kprintf("Running PSHARE scheduler\n");
+		return(&usched_pshare);
+	}
 	kprintf("WARNING: Running dummy userland scheduler\n");
 	return(&usched_dummy);
+
 }
 
 /*
Index: ./sys/sys/usched.h
===================================================================
RCS file: /cvs/src/sys/sys/usched.h,v
retrieving revision 1.15
diff -u -r1.15 usched.h
--- ./sys/sys/usched.h	21 Apr 2008 15:24:47 -0000	1.15
+++ ./sys/sys/usched.h	3 Jul 2008 03:38:51 -0000
@@ -59,7 +59,21 @@
 	u_short	unused02;
     } bsd4;
 
-    int		pad[4];		/* PAD for future expansion */
+    /*
+     * Proportional share scheduler 
+     */
+    struct {
+	int 		share;
+	float  		vft;
+	int             lastcpu;
+        int  		timecounter;
+	int 		state;
+	u_short		rqtype;
+	struct lwp 	*last_previous;
+	struct lwp 	*last_next;
+    }pshare;	
+	
+    int		pad[3];		/* PAD for future expansion */
 };
 
 /*
@@ -78,9 +92,28 @@
 /*
  * Kernel variables and procedures, or user system calls.
  */
+
+/*
+ * Scheduling state of the LWP
+ */ 
+
+#define GOT_CPU			1
+#define CPU_NOCONTEND		2	
+#define CPU_CONTEND		3
+
+/*
+* Flags for update_curproc_schedstate()
+*/
+
+#define ADD_LWP		1
+#define SELECT_LWP	2
+#define UNSELECT_LWP	3
+#define REM_LWP		4	
+
 #ifdef _KERNEL
 
 extern struct usched	usched_bsd4;
+extern struct usched	usched_pshare;
 extern struct usched	usched_dummy;
 extern cpumask_t usched_mastermask;
 
