[Swift-commit] cog r3857

swift at ci.uchicago.edu swift at ci.uchicago.edu
Fri Jan 17 16:30:03 CST 2014


------------------------------------------------------------------------
r3857 | jmwozniak | 2014-01-17 16:29:54 -0600 (Fri, 17 Jan 2014) | 2 lines

Fix output id

------------------------------------------------------------------------
Index: modules/provider-coaster-c-client/src/Lock.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Lock.cpp	(revision 3856)
+++ modules/provider-coaster-c-client/src/Lock.cpp	(working copy)
@@ -14,7 +14,7 @@
 #define DEBUG_LOCKS 1
 #if DEBUG_LOCKS == 1
 #define debug(format, args...)           \
-  {    printf("LOCK: " format "\n", ## args); \
+  {    printf("LOCK: " format "\n", id, ## args);        \
        fflush(stdout);                   \
   }
 #else
@@ -22,8 +22,8 @@
 #endif
 
 Lock::Lock() {
-  id = unique++;
-	debug("LOCK: %i NEW");
+	id= unique++;
+  debug("LOCK: %i NEW");
 	pthread_mutex_init(&l, NULL);
 }
 
@@ -32,12 +32,12 @@
 }
 
 void Lock::lock() {
-	printf("LOCK: %i ACQUIRE", id);
+	debug("LOCK: %i ACQUIRE");
 	pthread_mutex_lock(&l);
 }
 
 void Lock::unlock() {
-	debug("LOCK: %i RELEASE", id);
+	debug("LOCK: %i RELEASE");
 	pthread_mutex_unlock(&l);
 }
 



More information about the Swift-commit mailing list