Index: tests/unified_locking/thread_test.cfa
===================================================================
--- tests/unified_locking/thread_test.cfa	(revision 4ae968e1d1e92379c1086e51bbb58529ff40da6c)
+++ tests/unified_locking/thread_test.cfa	(revision cf444b64a4a158958376dc2ab509245568729ad6)
@@ -8,5 +8,6 @@
 static unsigned int threadCount = 2;
 static unsigned int lockCount = 1;
-static unsigned int num_times = 10000;
+static unsigned int total_times = 320000;
+static unsigned int num_times;
 static const int workBufferSize = 16;
 static unsigned int work_unlocked = 10000;
@@ -25,11 +26,12 @@
 thread worker {
     linear_backoff_then_block_lock * locks;
+    bool improved;
 };
 
-void ?{}( worker & w, linear_backoff_then_block_lock * locks ) {
+void ?{}( worker & w, linear_backoff_then_block_lock * locks, bool improved ) {
 	w.locks = locks;
+    w.improved = improved;
 }
 
-linear_backoff_then_block_lock norm_lock;
 
 void main( worker & this ) with(this) {
@@ -37,21 +39,23 @@
     for (int i = 0; i < workBufferSize; i += 1) buffer[i] = rand() % 1024;
     unsigned int lck = rand() % lockCount;
-    linear_backoff_then_block_lock * curr_lock = locks;//[lck];
+    linear_backoff_then_block_lock * curr_lock = &locks[lck];
     for (unsigned int i = 0; i < num_times; i++) {
         dowork(buffer, work_unlocked);
-        lock(curr_lock);
-        //printf("lock: %d %p ENTER\n", i, &curr_lock);
-        //lock(norm_lock);
+        if (improved) lock_improved(*curr_lock);
+        else lock(*curr_lock);
         dowork(buffer, work_locked);
-        //printf("lock: %d %p LEAVE\n", i, &curr_lock);
-        unlock(curr_lock);
-        //unlock(norm_lock);
+        unlock(*curr_lock);
         lck = rand() % lockCount;
-        //curr_lock = locks[lck];
+        curr_lock = &locks[lck];
     }
 }
 
+
 int main(int argc, char* argv[]) {
     switch (argc) {
+        case 7:
+            work_unlocked = atoi(argv[5]);
+        case 6:
+            work_locked = atoi(argv[5]);
         case 5:
             num_times = atoi(argv[4]);
@@ -68,18 +72,30 @@
     }
 	processor p[threadCount];
-    linear_backoff_then_block_lock locks;//[lockCount];
-    printf("lock allocation address: %p \n", &locks);
+    linear_backoff_then_block_lock locks[lockCount];
     worker * worker_arr[taskCount];
+    num_times = total_times  / taskCount;
 
-	printf("Start Test: martin lock simple\n");
+	//printf("Start Test: martin lock simple\n");
 	clock_t begin = clock();
 	for (unsigned int i = 0; i < taskCount; i++) {
-        worker_arr[i] = new( &locks );
+        worker_arr[i] = new( locks, false );
     }
     for (unsigned int i = 0; i < taskCount; i++) {
-        free( worker_arr[i] );
+        delete( worker_arr[i] );
     }
 	clock_t end = clock();
 	double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
-	printf("Done Test, time: %f\n", time_spent);
+	printf("norm: %f\n", time_spent);
+
+    //printf("Start Test: martin lock improved\n");
+	begin = clock();
+	for (unsigned int i = 0; i < taskCount; i++) {
+        worker_arr[i] = new( locks, true );
+    }
+    for (unsigned int i = 0; i < taskCount; i++) {
+        delete( worker_arr[i] );
+    }
+	end = clock();
+	time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
+	printf("improved: %f\n", time_spent);
 }
