[email protected] wrote:
Author: peter
Date: 2009-09-05 22:33:49 -0700 (Sat, 05 Sep 2009)
New Revision: 507
[snip]
Modified: trunk/choxevent.c
===================================================================
--- trunk/choxevent.c 2009-09-05 03:13:00 UTC (rev 506)
+++ trunk/choxevent.c 2009-09-06 05:33:49 UTC (rev 507)
@@ -93,12 +93,8 @@
* in the queue are read or written.
*/
void Chox11Event_QueueLock(void) {
-// static int count = 0;
-
- //fprintf(stderr, "Lock here %d\n", count);
- if (pthread_mutex_lock(&event_mutex)) abort();
+ assert(!pthread_mutex_lock(&event_mutex));
}
-//#define Chox11Event_QueueLock() pthread_mutex_lock(&event_mutex)
/**
@@ -107,8 +103,7 @@
* Unlock after the above
*/
void Chox11Event_QueueUnlock(void) {
- //fputs("Unlock here\n", stderr);
- if (pthread_mutex_unlock(&event_mutex)) abort();
+ assert(!pthread_mutex_unlock(&event_mutex));
}
//#define Chox11Event_QueueUnlock() pthread_mutex_unlock(&event_mutex)
@@ -1035,6 +1030,30 @@
}
[snip]
AFAIK, if NDEBUG is defined then the pthread function calls within the
asserts will disappear. I'm not sure whether this is your intention or not?
Lee.
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK