Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision 2f6a7e9384831f69b216448a851da2b01007a715)
+++ src/libcfa/concurrency/monitor.c	(revision ea7d2b051267e571f113e8dabae0d886eda94432)
@@ -34,11 +34,11 @@
 static inline bool is_accepted( monitor_desc * this, const __monitor_group_t & monitors );
 
-static inline void lock_all  ( spinlock * locks [], __lock_size_t count );
-static inline void lock_all  ( monitor_desc * source [], spinlock * /*out*/ locks [], __lock_size_t count );
-static inline void unlock_all( spinlock * locks [], __lock_size_t count );
+static inline void lock_all  ( __spinlock_t * locks [], __lock_size_t count );
+static inline void lock_all  ( monitor_desc * source [], __spinlock_t * /*out*/ locks [], __lock_size_t count );
+static inline void unlock_all( __spinlock_t * locks [], __lock_size_t count );
 static inline void unlock_all( monitor_desc * locks [], __lock_size_t count );
 
-static inline void save   ( monitor_desc * ctx [], __lock_size_t count, spinlock * locks [], unsigned int /*out*/ recursions [], __waitfor_mask_t /*out*/ masks [] );
-static inline void restore( monitor_desc * ctx [], __lock_size_t count, spinlock * locks [], unsigned int /*in */ recursions [], __waitfor_mask_t /*in */ masks [] );
+static inline void save   ( monitor_desc * ctx [], __lock_size_t count, __spinlock_t * locks [], unsigned int /*out*/ recursions [], __waitfor_mask_t /*out*/ masks [] );
+static inline void restore( monitor_desc * ctx [], __lock_size_t count, __spinlock_t * locks [], unsigned int /*in */ recursions [], __waitfor_mask_t /*in */ masks [] );
 
 static inline void init     ( __lock_size_t count, monitor_desc * monitors [], __condition_node_t & waiter, __condition_criterion_t criteria [] );
@@ -71,5 +71,5 @@
 	unsigned int recursions[ count ];                         /* Save the current recursion levels to restore them later                             */ \
 	__waitfor_mask_t masks [ count ];                         /* Save the current waitfor masks to restore them later                                */ \
-	spinlock *   locks     [ count ];                         /* We need to pass-in an array of locks to BlockInternal                               */ \
+	__spinlock_t *   locks [ count ];                         /* We need to pass-in an array of locks to BlockInternal                               */ \
 
 #define monitor_save    save   ( monitors, count, locks, recursions, masks )
@@ -85,5 +85,5 @@
 	static void __enter_monitor_desc( monitor_desc * this, const __monitor_group_t & group ) {
 		// Lock the monitor spinlock, lock_yield to reduce contention
-		lock_yield( &this->lock DEBUG_CTX2 );
+		lock_yield( this->lock DEBUG_CTX2 );
 		thread_desc * thrd = this_thread;
 
@@ -127,5 +127,5 @@
 
 		// Release the lock and leave
-		unlock( &this->lock );
+		unlock( this->lock );
 		return;
 	}
@@ -133,5 +133,5 @@
 	static void __enter_monitor_dtor( monitor_desc * this, fptr_t func ) {
 		// Lock the monitor spinlock, lock_yield to reduce contention
-		lock_yield( &this->lock DEBUG_CTX2 );
+		lock_yield( this->lock DEBUG_CTX2 );
 		thread_desc * thrd = this_thread;
 
@@ -145,5 +145,5 @@
 			set_owner( this, thrd );
 
-			unlock( &this->lock );
+			unlock( this->lock );
 			return;
 		}
@@ -197,5 +197,5 @@
 	void __leave_monitor_desc( monitor_desc * this ) {
 		// Lock the monitor spinlock, lock_yield to reduce contention
-		lock_yield( &this->lock DEBUG_CTX2 );
+		lock_yield( this->lock DEBUG_CTX2 );
 
 		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner);
@@ -210,5 +210,5 @@
 		if( this->recursion != 0) {
 			LIB_DEBUG_PRINT_SAFE("Kernel :  recursion still %d\n", this->recursion);
-			unlock( &this->lock );
+			unlock( this->lock );
 			return;
 		}
@@ -218,5 +218,5 @@
 
 		// We can now let other threads in safely
-		unlock( &this->lock );
+		unlock( this->lock );
 
 		//We need to wake-up the thread
@@ -243,5 +243,5 @@
 
 		// Lock the monitor now
-		lock_yield( &this->lock DEBUG_CTX2 );
+		lock_yield( this->lock DEBUG_CTX2 );
 
 		disable_interrupts();
@@ -730,21 +730,21 @@
 }
 
-static inline void lock_all( spinlock * locks [], __lock_size_t count ) {
+static inline void lock_all( __spinlock_t * locks [], __lock_size_t count ) {
 	for( __lock_size_t i = 0; i < count; i++ ) {
-		lock_yield( locks[i] DEBUG_CTX2 );
-	}
-}
-
-static inline void lock_all( monitor_desc * source [], spinlock * /*out*/ locks [], __lock_size_t count ) {
+		lock_yield( *locks[i] DEBUG_CTX2 );
+	}
+}
+
+static inline void lock_all( monitor_desc * source [], __spinlock_t * /*out*/ locks [], __lock_size_t count ) {
 	for( __lock_size_t i = 0; i < count; i++ ) {
-		spinlock * l = &source[i]->lock;
-		lock_yield( l DEBUG_CTX2 );
+		__spinlock_t * l = &source[i]->lock;
+		lock_yield( *l DEBUG_CTX2 );
 		if(locks) locks[i] = l;
 	}
 }
 
-static inline void unlock_all( spinlock * locks [], __lock_size_t count ) {
+static inline void unlock_all( __spinlock_t * locks [], __lock_size_t count ) {
 	for( __lock_size_t i = 0; i < count; i++ ) {
-		unlock( locks[i] );
+		unlock( *locks[i] );
 	}
 }
@@ -752,5 +752,5 @@
 static inline void unlock_all( monitor_desc * locks [], __lock_size_t count ) {
 	for( __lock_size_t i = 0; i < count; i++ ) {
-		unlock( &locks[i]->lock );
+		unlock( locks[i]->lock );
 	}
 }
@@ -759,5 +759,5 @@
 	monitor_desc * ctx [],
 	__lock_size_t count,
-	__attribute((unused)) spinlock * locks [],
+	__attribute((unused)) __spinlock_t * locks [],
 	unsigned int /*out*/ recursions [],
 	__waitfor_mask_t /*out*/ masks []
@@ -772,5 +772,5 @@
 	monitor_desc * ctx [],
 	__lock_size_t count,
-	spinlock * locks [],
+	__spinlock_t * locks [],
 	unsigned int /*out*/ recursions [],
 	__waitfor_mask_t /*out*/ masks []
