targets/Linux/plc_Linux_main.c
changeset 236 a32817e81f5e
parent 235 a66e150f2888
child 239 112b4bc523b3
--- a/targets/Linux/plc_Linux_main.c	Wed Sep 03 17:28:17 2008 +0200
+++ b/targets/Linux/plc_Linux_main.c	Thu Sep 04 14:57:52 2008 +0200
@@ -5,7 +5,7 @@
 #include <stdlib.h>
 #include <pthread.h> 
 
-long AtomicCompareExchange(long* atomicvar,long exchange, long compared)
+long AtomicCompareExchange(long* atomicvar,long compared, long exchange)
 {
     return __sync_val_compare_and_swap(atomicvar, compared, exchange);
 }
@@ -95,9 +95,9 @@
 {
     /* Eventually unlock debugger thread*/
     __debug_tick = -1;
-    pthread_mutex_lock(&wait_mutex);
+    //pthread_mutex_lock(&wait_mutex);
     pthread_cond_broadcast(&wait_cond);
-    pthread_mutex_unlock(&wait_mutex);
+    //pthread_mutex_unlock(&wait_mutex);
 }
 
 int stopPLC()
@@ -126,7 +126,7 @@
 {
     /* signal debugger thread to continue*/
     __debug_tick = __tick;
-    pthread_mutex_lock(&wait_mutex);
+    //pthread_mutex_lock(&wait_mutex);
     pthread_cond_broadcast(&wait_cond);
-    pthread_mutex_unlock(&wait_mutex);
+    //pthread_mutex_unlock(&wait_mutex);
 }