Index: tests/concurrent/examples/.expect/datingService.txt
===================================================================
--- tests/concurrent/examples/.expect/datingService.txt	(revision 1d72a114ba5299f58ce9efac3223c109bf97b89e)
+++ tests/concurrent/examples/.expect/datingService.txt	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -1,40 +1,0 @@
-Girl:17 is dating Boy at 2 with ccode 17
- Boy:2 is dating Girl 17 with ccode 17
- Boy:14 is dating Girl 5 with ccode 5
-Girl:5 is dating Boy at 14 with ccode 5
- Boy:9 is dating Girl 10 with ccode 10
-Girl:10 is dating Boy at 9 with ccode 10
- Boy:1 is dating Girl 18 with ccode 18
-Girl:18 is dating Boy at 1 with ccode 18
- Boy:16 is dating Girl 3 with ccode 3
-Girl:3 is dating Boy at 16 with ccode 3
- Boy:5 is dating Girl 14 with ccode 14
-Girl:14 is dating Boy at 5 with ccode 14
- Boy:15 is dating Girl 4 with ccode 4
-Girl:4 is dating Boy at 15 with ccode 4
-Girl:0 is dating Boy at 19 with ccode 0
- Boy:19 is dating Girl 0 with ccode 0
-Girl:9 is dating Boy at 10 with ccode 9
- Boy:10 is dating Girl 9 with ccode 9
-Girl:11 is dating Boy at 8 with ccode 11
- Boy:8 is dating Girl 11 with ccode 11
- Boy:12 is dating Girl 7 with ccode 7
-Girl:7 is dating Boy at 12 with ccode 7
- Boy:11 is dating Girl 8 with ccode 8
-Girl:8 is dating Boy at 11 with ccode 8
-Girl:16 is dating Boy at 3 with ccode 16
- Boy:3 is dating Girl 16 with ccode 16
-Girl:15 is dating Boy at 4 with ccode 15
- Boy:4 is dating Girl 15 with ccode 15
-Girl:19 is dating Boy at 0 with ccode 19
- Boy:0 is dating Girl 19 with ccode 19
-Girl:2 is dating Boy at 17 with ccode 2
- Boy:17 is dating Girl 2 with ccode 2
- Boy:13 is dating Girl 6 with ccode 6
-Girl:6 is dating Boy at 13 with ccode 6
- Boy:7 is dating Girl 12 with ccode 12
-Girl:12 is dating Boy at 7 with ccode 12
-Girl:13 is dating Boy at 6 with ccode 13
- Boy:6 is dating Girl 13 with ccode 13
-Girl:1 is dating Boy at 18 with ccode 1
- Boy:18 is dating Girl 1 with ccode 1
Index: tests/concurrent/examples/datingService.cfa
===================================================================
--- tests/concurrent/examples/datingService.cfa	(revision 1d72a114ba5299f58ce9efac3223c109bf97b89e)
+++ tests/concurrent/examples/datingService.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -1,5 +1,5 @@
 //
 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
-// 
+//
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
@@ -35,5 +35,5 @@
 		signal_block( Boys[ccode] );					// restart boy to set phone number
 	} // if
-	sout | "Girl:" | PhoneNo | "is dating Boy at" | BoyPhoneNo | "with ccode" | ccode;
+	//sout | "Girl:" | PhoneNo | "is dating Boy at" | BoyPhoneNo | "with ccode" | ccode;
 	return BoyPhoneNo;
 } // DatingService girl
@@ -47,5 +47,5 @@
 		signal_block( Girls[ccode] );					// restart girl to set phone number
 	} // if
-	sout | " Boy:" | PhoneNo | "is dating Girl" | GirlPhoneNo | "with ccode" | ccode;
+	//sout | " Boy:" | PhoneNo | "is dating Girl" | GirlPhoneNo | "with ccode" | ccode;
 	return GirlPhoneNo;
 } // DatingService boy
Index: tests/concurrent/multi-monitor.cfa
===================================================================
--- tests/concurrent/multi-monitor.cfa	(revision 1d72a114ba5299f58ce9efac3223c109bf97b89e)
+++ tests/concurrent/multi-monitor.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -11,5 +11,9 @@
 
 void increment( monitor_t & mutex p1, monitor_t & mutex p2, int & value ) {
+	assert(active_thread() == get_monitor(p1)->owner);
+	assert(active_thread() == get_monitor(p2)->owner);
 	value += 1;
+	assert(active_thread() == get_monitor(p1)->owner);
+	assert(active_thread() == get_monitor(p2)->owner);
 }
 
Index: tests/concurrent/park/.expect/contention.txt
===================================================================
--- tests/concurrent/park/.expect/contention.txt	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
+++ tests/concurrent/park/.expect/contention.txt	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -0,0 +1,21 @@
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done
+Done Unparker
Index: tests/concurrent/park/.expect/force_preempt.txt
===================================================================
--- tests/concurrent/park/.expect/force_preempt.txt	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
+++ tests/concurrent/park/.expect/force_preempt.txt	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -0,0 +1,75 @@
+0 Calling unpark 0
+1 Calling unpark 0
+2 Calling unpark 0
+3 Calling unpark 0
+4 Calling unpark 0
+0 Parking 0
+0 Unparked 0
+0 Calling unpark 1
+1 Parking 0
+1 Unparked 0
+1 Calling unpark 1
+2 Parking 0
+2 Unparked 0
+2 Calling unpark 1
+3 Parking 0
+3 Unparked 0
+3 Calling unpark 1
+4 Parking 0
+4 Unparked 0
+4 Calling unpark 1
+0 Parking 1
+0 Unparked 1
+0 Calling unpark 2
+1 Parking 1
+1 Unparked 1
+1 Calling unpark 2
+2 Parking 1
+2 Unparked 1
+2 Calling unpark 2
+3 Parking 1
+3 Unparked 1
+3 Calling unpark 2
+4 Parking 1
+4 Unparked 1
+4 Calling unpark 2
+0 Parking 2
+0 Unparked 2
+0 Calling unpark 3
+1 Parking 2
+1 Unparked 2
+1 Calling unpark 3
+2 Parking 2
+2 Unparked 2
+2 Calling unpark 3
+3 Parking 2
+3 Unparked 2
+3 Calling unpark 3
+4 Parking 2
+4 Unparked 2
+4 Calling unpark 3
+0 Parking 3
+0 Unparked 3
+0 Calling unpark 4
+1 Parking 3
+1 Unparked 3
+1 Calling unpark 4
+2 Parking 3
+2 Unparked 3
+2 Calling unpark 4
+3 Parking 3
+3 Unparked 3
+3 Calling unpark 4
+4 Parking 3
+4 Unparked 3
+4 Calling unpark 4
+0 Parking 4
+0 Unparked 4
+1 Parking 4
+1 Unparked 4
+2 Parking 4
+2 Unparked 4
+3 Parking 4
+3 Unparked 4
+4 Parking 4
+4 Unparked 4
Index: tests/concurrent/park/contention.cfa
===================================================================
--- tests/concurrent/park/contention.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
+++ tests/concurrent/park/contention.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -0,0 +1,62 @@
+#include <kernel.hfa>
+#include <thread.hfa>
+
+thread_local drand48_data buffer = { 0 };
+int myrand() {
+	long int result;
+	lrand48_r(&buffer, &result);
+	return result;
+}
+
+
+thread Thread {};
+void ^?{}(Thread & mutex this) {}
+
+enum Constants { blocked_size = 20 };
+Thread * volatile blocked[blocked_size];
+
+void main( Thread & this ) {
+	for(int i = 0; i < 1000; i++) {
+		int idx = myrand() % blocked_size;
+		if(blocked[idx]) {
+			Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST);
+			unpark( *thrd );
+		} else {
+			Thread * thrd = __atomic_exchange_n(&blocked[idx], &this, __ATOMIC_SEQ_CST);
+			unpark( *thrd);
+			park();
+		}
+	}
+	printf("Done\n");
+}
+
+// Extra thread to avoid deadlocking
+thread Unparker {};
+
+void main( Unparker & this ) {
+	while(true) {
+		waitfor( ^?{} : this ) {
+			break;
+		} or else {
+			int idx = myrand() % blocked_size;
+			Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST);
+			unpark( *thrd );
+			yield( myrand() % 20 );
+		}
+	}
+	printf("Done Unparker\n");
+}
+
+
+int main() {
+	for(i ; blocked_size) {
+		blocked[i] = 0p;
+	}
+
+	processor p[3];
+
+	Unparker u;
+	{
+		Thread t[20];
+	}
+}
Index: tests/concurrent/park/force_preempt.cfa
===================================================================
--- tests/concurrent/park/force_preempt.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
+++ tests/concurrent/park/force_preempt.cfa	(revision a8078eef84a4a1ff1e577a67991ee2e0f64210a2)
@@ -0,0 +1,49 @@
+#include <thread.hfa>
+#include <fstream.hfa>
+
+volatile int global = 0;
+
+thread Poller {};
+void main(Poller & this) {
+	while(true) {
+		waitfor( ^?{} : this ) {
+			break;
+		} or else {
+			global = (global + 1) % 10;
+			yield();
+		}
+	}
+}
+
+thread Waiter;
+thread Waiter {};
+
+
+volatile int count = 0;
+
+void main(Waiter & this) {
+	// Get a unique id
+	int id = __atomic_fetch_add(&count, 1, __ATOMIC_SEQ_CST);
+
+	for(int i = 0; i < 5; i++) {
+		// Unpark this thread, don't force a yield
+		sout | id | "Calling unpark" | i;
+		unpark(this);
+
+		// Force a preemption before the call to park
+		int prev = global;
+		while(prev == global) {}
+
+		// Park this thread,
+		sout | id | "Parking" | i;
+		park();
+		sout | id | "Unparked" | i;
+	}
+}
+
+int main() {
+	Poller p;
+	{
+		Waiter waiters[5];
+	}
+}
