Index: libcfa/src/concurrency/monitor.cfa
===================================================================
--- libcfa/src/concurrency/monitor.cfa	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ libcfa/src/concurrency/monitor.cfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -990,4 +990,62 @@
 }
 
+//-----------------------------------------------------------------------------
+// Enter routine for mutex stmt
+// Can't be accepted since a mutex stmt is effectively an anonymous routine
+// Thus we do not need a monitor group
+void lock( monitor$ * this ) {
+	thread$ * thrd = active_thread();
+
+	// Lock the monitor spinlock
+	lock( this->lock __cfaabi_dbg_ctx2 );
+
+	__cfaabi_dbg_print_safe( "Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner);
+
+	if( unlikely(0 != (0x1 & (uintptr_t)this->owner)) ) {
+		abort( "Attempt by thread \"%.256s\" (%p) to access joined monitor %p.", thrd->self_cor.name, thrd, this );
+	}
+	else if( !this->owner ) {
+		// No one has the monitor, just take it
+		__set_owner( this, thrd );
+
+		__cfaabi_dbg_print_safe( "Kernel :  mon is free \n" );
+	}
+	else if( this->owner == thrd) {
+		// We already have the monitor, just note how many times we took it
+		this->recursion += 1;
+
+		__cfaabi_dbg_print_safe( "Kernel :  mon already owned \n" );
+	}
+	else {
+		__cfaabi_dbg_print_safe( "Kernel :  blocking \n" );
+
+		// Some one else has the monitor, wait in line for it
+		/* paranoid */ verify( thrd->link.next == 0p );
+		append( this->entry_queue, thrd );
+		/* paranoid */ verify( thrd->link.next == 1p );
+
+		unlock( this->lock );
+		park();
+
+		__cfaabi_dbg_print_safe( "Kernel : %10p Entered  mon %p\n", thrd, this);
+
+		/* paranoid */ verifyf( active_thread() == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", active_thread(), this->owner, this->recursion, this );
+		return;
+	}
+
+	__cfaabi_dbg_print_safe( "Kernel : %10p Entered  mon %p\n", thrd, this);
+
+	/* paranoid */ verifyf( active_thread() == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", active_thread(), this->owner, this->recursion, this );
+	/* paranoid */ verify( this->lock.lock );
+
+	// Release the lock and leave
+	unlock( this->lock );
+	return;
+}
+
+// Leave routine for mutex stmt
+// Is just a wrapper around __leave for the is_lock trait to see
+void unlock( monitor$ * this ) { __leave( this ); }
+
 // Local Variables: //
 // mode: c //
Index: libcfa/src/concurrency/monitor.hfa
===================================================================
--- libcfa/src/concurrency/monitor.hfa	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ libcfa/src/concurrency/monitor.hfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -149,4 +149,8 @@
 void __waitfor_internal( const __waitfor_mask_t & mask, int duration );
 
+// lock and unlock routines for mutex statements to use
+void lock( monitor$ * this );
+void unlock( monitor$ * this );
+
 // Local Variables: //
 // mode: c //
Index: libcfa/src/concurrency/mutex_stmt.hfa
===================================================================
--- libcfa/src/concurrency/mutex_stmt.hfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
+++ libcfa/src/concurrency/mutex_stmt.hfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -0,0 +1,46 @@
+#include "bits/algorithm.hfa"
+#include <assert.h>
+#include "invoke.h"
+#include "stdlib.hfa"
+#include <stdio.h>
+
+//-----------------------------------------------------------------------------
+// is_lock
+trait is_lock(L & | sized(L)) {
+	// For acquiring a lock
+	void lock( L & );
+
+	// For releasing a lock
+	void unlock( L & );
+};
+
+forall(L & | is_lock(L)) {
+
+    struct __mutex_stmt_lock_guard {
+        L ** lockarr;
+        __lock_size_t count;
+    };
+    
+    static inline void ?{}( __mutex_stmt_lock_guard(L) & this, L * lockarr [], __lock_size_t count  ) {
+        this.lockarr = lockarr;
+        this.count = count;
+
+        // Sort locks based on address
+        __libcfa_small_sort(this.lockarr, count);
+
+        // acquire locks in order
+        for ( size_t i = 0; i < count; i++ ) {
+            lock(*this.lockarr[i]);
+        }
+    }
+    
+    static inline void ^?{}( __mutex_stmt_lock_guard(L) & this ) with(this) {
+        for ( size_t i = count; i > 0; i-- ) {
+            unlock(*lockarr[i - 1]);
+        }
+    }
+
+    static inline L * __get_pointer( L & lock ) {
+        return &lock;
+    }
+}
Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ src/Concurrency/Keywords.cc	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -93,4 +93,5 @@
 		ObjectDecl * addField( StructDecl * );
 		void addRoutines( ObjectDecl *, FunctionDecl * );
+		void addLockUnlockRoutines( StructDecl * );
 
 		virtual bool is_target( StructDecl * decl ) = 0;
@@ -322,4 +323,5 @@
 		StructDecl* dtor_guard_decl = nullptr;
 		StructDecl* thread_guard_decl = nullptr;
+		StructDecl* lock_guard_decl = nullptr;
 
 		static std::unique_ptr< Type > generic_func;
@@ -463,5 +465,4 @@
 	}
 
-
 	void ConcurrentSueKeyword::handle( StructDecl * decl ) {
 		if( ! decl->body ) return;
@@ -479,5 +480,9 @@
 		FunctionDecl * func = forwardDeclare( decl );
 		ObjectDecl * field = addField( decl );
+
+		// add get_.* routine
 		addRoutines( field, func );
+		// add lock/unlock routines to monitors for use by mutex stmt
+		addLockUnlockRoutines( decl );
 	}
 
@@ -612,4 +617,6 @@
 	}
 
+	// This function adds the get_.* routine body for coroutines, monitors etc
+	// 		after their corresponding struct has been made
 	void ConcurrentSueKeyword::addRoutines( ObjectDecl * field, FunctionDecl * func ) {
 		CompoundStmt * statement = new CompoundStmt();
@@ -634,4 +641,112 @@
 
 		declsToAddAfter.push_back( get_decl );
+	}
+
+	// Generates lock/unlock routines for monitors to be used by mutex stmts
+	void ConcurrentSueKeyword::addLockUnlockRoutines( StructDecl * decl ) {
+		// this routine will be called for all ConcurrentSueKeyword children so only continue if we are a monitor
+		if ( !decl->is_monitor() ) return;
+
+		FunctionType * lock_fn_type = new FunctionType( noQualifiers, false );
+		FunctionType * unlock_fn_type = new FunctionType( noQualifiers, false );
+
+		// create this ptr parameter for both routines
+		ObjectDecl * this_decl = new ObjectDecl(
+			"this",
+			noStorageClasses,
+			LinkageSpec::Cforall,
+			nullptr,
+			new ReferenceType(
+				noQualifiers,
+				new StructInstType(
+					noQualifiers,
+					decl
+				)
+			),
+			nullptr
+		);
+
+		lock_fn_type->get_parameters().push_back( this_decl->clone() );
+		unlock_fn_type->get_parameters().push_back( this_decl->clone() );
+
+		delete this_decl;
+
+
+		//////////////////////////////////////////////////////////////////////
+		// The following generates this lock routine for all monitors
+		/*
+			void lock (monitor_t & this) {
+				lock(get_monitor(this));
+			}	
+		*/
+		FunctionDecl * lock_decl = new FunctionDecl(
+			"lock",
+			Type::Static,
+			LinkageSpec::Cforall,
+			lock_fn_type,
+			nullptr,
+			{ },
+			Type::Inline
+		);
+		fixupGenerics(lock_fn_type, decl);
+
+		UntypedExpr * get_monitor_lock =  new UntypedExpr (
+			new NameExpr( "get_monitor" ),
+			{ new VariableExpr( lock_fn_type->get_parameters().front() ) }
+		);
+
+		CompoundStmt * lock_statement = new CompoundStmt();
+		lock_statement->push_back(
+			new ExprStmt( 
+				new UntypedExpr (
+					new NameExpr( "lock" ),
+					{
+						get_monitor_lock
+					}
+				)
+			)
+		);
+		lock_decl->set_statements( lock_statement );
+
+		//////////////////////////////////////////////////////////////////
+		// The following generates this routine for all monitors
+		/*
+			void unlock (monitor_t & this) {
+				unlock(get_monitor(this));
+			}	
+		*/
+		FunctionDecl * unlock_decl = new FunctionDecl(
+			"unlock",
+			Type::Static,
+			LinkageSpec::Cforall,
+			unlock_fn_type,
+			nullptr,
+			{ },
+			Type::Inline
+		);
+		fixupGenerics(unlock_fn_type, decl);
+
+		CompoundStmt * unlock_statement = new CompoundStmt();
+
+		UntypedExpr * get_monitor_unlock =  new UntypedExpr (
+			new NameExpr( "get_monitor" ),
+			{ new VariableExpr( unlock_fn_type->get_parameters().front() ) }
+		);
+
+		unlock_statement->push_back(
+			new ExprStmt( 
+				new UntypedExpr(
+					new NameExpr( "unlock" ),
+					{
+						get_monitor_unlock
+					}
+				)
+			)
+		);
+		unlock_decl->set_statements( unlock_statement );
+		
+		// pushes routines to declsToAddAfter to add at a later time
+		declsToAddAfter.push_back( lock_decl );
+		declsToAddAfter.push_back( unlock_decl );
 	}
 
@@ -937,4 +1052,8 @@
 			assert( !thread_guard_decl );
 			thread_guard_decl = decl;
+		} 
+		else if ( decl->name == "__mutex_stmt_lock_guard" && decl->body ) {
+			assert( !lock_guard_decl );
+			lock_guard_decl = decl;
 		}
 	}
@@ -1081,8 +1200,5 @@
 				new PointerType(
 					noQualifiers,
-					new StructInstType(
-						noQualifiers,
-						monitor_decl
-					)
+					new TypeofType( noQualifiers, args.front()->clone() )
 				),
 				new ConstantExpr( Constant::from_ulong( args.size() ) ),
@@ -1093,5 +1209,5 @@
 				map_range < std::list<Initializer*> > ( args, [](Expression * var ){
 					return new SingleInit( new UntypedExpr(
-						new NameExpr( "get_monitor" ),
+						new NameExpr( "__get_pointer" ),
 						{ var }
 					) );
@@ -1099,4 +1215,9 @@
 			)
 		);
+
+		StructInstType * lock_guard_struct = new StructInstType( noQualifiers, lock_guard_decl );
+		TypeExpr * lock_type_expr = new TypeExpr( new TypeofType( noQualifiers, args.front()->clone() ) );
+
+		lock_guard_struct->parameters.push_back( lock_type_expr ) ;
 
 		// in reverse order :
@@ -1108,8 +1229,5 @@
 				LinkageSpec::Cforall,
 				nullptr,
-				new StructInstType(
-					noQualifiers,
-					guard_decl
-				),
+				lock_guard_struct,
 				new ListInit(
 					{
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ tests/Makefile.am	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -82,6 +82,5 @@
 	concurrent/clib_tls.c \
 	exceptions/with-threads.hfa \
-	exceptions/except-io.hfa \
-	unified_locking/mutex_test.hfa
+	exceptions/except-io.hfa
 
 dist-hook:
Index: tests/concurrent/mutexstmt/.expect/locks.txt
===================================================================
--- tests/concurrent/mutexstmt/.expect/locks.txt	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
+++ tests/concurrent/mutexstmt/.expect/locks.txt	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -0,0 +1,4 @@
+Start Test: single lock mutual exclusion
+End Test: single lock mutual exclusion
+Start Test: multi lock deadlock/mutual exclusion
+End Test: multi lock deadlock/mutual exclusion
Index: tests/concurrent/mutexstmt/locks.cfa
===================================================================
--- tests/concurrent/mutexstmt/locks.cfa	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ tests/concurrent/mutexstmt/locks.cfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -1,3 +1,3 @@
-#include <mutex_stmt_locks.hfa>
+#include <mutex_stmt.hfa>
 #include <locks.hfa>
 
@@ -13,5 +13,5 @@
 	for (unsigned int i = 0; i < num_times; i++) {
 		mutex ( m1 ) count++;
-		mutex ( m1 ) {
+		mutex ( m1 ) { 
 			assert(!insideFlag);
 			insideFlag = true;
@@ -65,5 +65,5 @@
 	printf("Start Test: single lock mutual exclusion\n");
 	{
-		T_Mutex t[10];
+		T_Mutex t[1];
 	}
 	printf("End Test: single lock mutual exclusion\n");
Index: tests/concurrent/mutexstmt/monitors.cfa
===================================================================
--- tests/concurrent/mutexstmt/monitors.cfa	(revision 6c2dc0032de09f8ecca147dc451f004cb55c4bba)
+++ tests/concurrent/mutexstmt/monitors.cfa	(revision 52fad0ce076ad13aeb740fd03e9772ce38682fd3)
@@ -1,3 +1,4 @@
 #include <monitor.hfa>
+#include <mutex_stmt.hfa>
 #include <stdio.h>
 #include <stdlib.hfa>
@@ -13,4 +14,5 @@
 bool insideFlag = false;
 int count = 0;
+bool startFlag = false;
 
 void main( T_Mutex & this ) {
