Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision 10ef329a86471ef42e84a0db45f6e6b1b10d45bd)
+++ kernel/generic/include/ipc/ipc.h	(revision ff48a15c09c90bcd962af59dd7a0a1bf266de1cc)
@@ -206,4 +206,6 @@
 #define IPC_MAX_PHONES  16
 
+#include <synch/spinlock.h>
+#include <synch/mutex.h>
 #include <synch/waitq.h>
 
@@ -226,5 +228,5 @@
 /** Structure identifying phone (in TASK structure) */
 typedef struct {
-	SPINLOCK_DECLARE(lock);
+	mutex_t lock;
 	link_t link;
 	struct answerbox *callee;
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 10ef329a86471ef42e84a0db45f6e6b1b10d45bd)
+++ kernel/generic/src/ipc/ipc.c	(revision ff48a15c09c90bcd962af59dd7a0a1bf266de1cc)
@@ -38,5 +38,7 @@
  */
 
+#include <synch/synch.h>
 #include <synch/spinlock.h>
+#include <synch/mutex.h>
 #include <synch/waitq.h>
 #include <synch/synch.h>
@@ -141,5 +143,5 @@
 void ipc_phone_connect(phone_t *phone, answerbox_t *box)
 {
-	spinlock_lock(&phone->lock);
+	mutex_lock(&phone->lock);
 
 	phone->state = IPC_PHONE_CONNECTED;
@@ -150,5 +152,5 @@
 	spinlock_unlock(&box->lock);
 
-	spinlock_unlock(&phone->lock);
+	mutex_unlock(&phone->lock);
 }
 
@@ -159,5 +161,5 @@
 void ipc_phone_init(phone_t *phone)
 {
-	spinlock_initialize(&phone->lock, "phone_lock");
+	mutex_initialize(&phone->lock);
 	phone->callee = NULL;
 	phone->state = IPC_PHONE_FREE;
@@ -262,7 +264,7 @@
 	answerbox_t *box;
 
-	spinlock_lock(&phone->lock);
+	mutex_lock(&phone->lock);
 	if (phone->state != IPC_PHONE_CONNECTED) {
-		spinlock_unlock(&phone->lock);
+		mutex_unlock(&phone->lock);
 		if (call->flags & IPC_CALL_FORWARDED) {
 			IPC_SET_RETVAL(call->data, EFORWARD);
@@ -279,5 +281,5 @@
 	_ipc_call(phone, box, call);
 	
-	spinlock_unlock(&phone->lock);
+	mutex_unlock(&phone->lock);
 	return 0;
 }
@@ -298,9 +300,9 @@
 	call_t *call;
 	
-	spinlock_lock(&phone->lock);
+	mutex_lock(&phone->lock);
 	if (phone->state == IPC_PHONE_FREE ||
 	    phone->state == IPC_PHONE_HUNGUP ||
 	    phone->state == IPC_PHONE_CONNECTING) {
-		spinlock_unlock(&phone->lock);
+		mutex_unlock(&phone->lock);
 		return -1;
 	}
@@ -321,5 +323,5 @@
 
 	phone->state = IPC_PHONE_HUNGUP;
-	spinlock_unlock(&phone->lock);
+	mutex_unlock(&phone->lock);
 
 	return 0;
@@ -450,5 +452,5 @@
 		phone = list_get_instance(TASK->answerbox.connected_phones.next,
 		    phone_t, link);
-		if (!spinlock_trylock(&phone->lock)) {
+		if (SYNCH_FAILED(mutex_trylock(&phone->lock))) {
 			spinlock_unlock(&TASK->answerbox.lock);
 			DEADLOCK_PROBE(p_phonelck, DEADLOCK_THRESHOLD);
@@ -461,5 +463,5 @@
 		list_remove(&phone->link);
 
-		spinlock_unlock(&phone->lock);
+		mutex_unlock(&phone->lock);
 	}
 
@@ -536,5 +538,8 @@
 	printf("PHONE:\n");
 	for (i = 0; i < IPC_MAX_PHONES; i++) {
-		spinlock_lock(&task->phones[i].lock);
+		if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) {
+			printf("%d: mutex busy\n", i);
+			continue;
+		}
 		if (task->phones[i].state != IPC_PHONE_FREE) {
 			printf("%d: ", i);
@@ -561,5 +566,5 @@
 			    atomic_get(&task->phones[i].active_calls));
 		}
-		spinlock_unlock(&task->phones[i].lock);
+		mutex_unlock(&task->phones[i].lock);
 	}
 
@@ -580,5 +585,5 @@
 	/* Print answerbox - calls */
 	printf("ABOX - DISPATCHED CALLS:\n");
-	for (tmp=task->answerbox.dispatched_calls.next; 
+	for (tmp = task->answerbox.dispatched_calls.next; 
 	     tmp != &task->answerbox.dispatched_calls; 
 	     tmp = tmp->next) {
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision 10ef329a86471ef42e84a0db45f6e6b1b10d45bd)
+++ kernel/generic/src/ipc/sysipc.c	(revision ff48a15c09c90bcd962af59dd7a0a1bf266de1cc)
@@ -169,5 +169,5 @@
 		 * not the originator
 		 */
-		spinlock_lock(&answer->data.phone->lock);
+		mutex_lock(&answer->data.phone->lock);
 		spinlock_lock(&TASK->answerbox.lock);
 		if (answer->data.phone->state == IPC_PHONE_CONNECTED) {
@@ -176,5 +176,5 @@
 		}
 		spinlock_unlock(&TASK->answerbox.lock);
-		spinlock_unlock(&answer->data.phone->lock);
+		mutex_unlock(&answer->data.phone->lock);
 	}
 
