Karl Zweimüller / LcdWindow

Fork of LcdWindow by Hendrik Lipka

Revision:
10:d40c70908bf0
Parent:
9:2fe93daa2106
--- a/semaphore.cpp	Tue Feb 22 22:57:44 2011 +0000
+++ b/semaphore.cpp	Mon Jan 04 20:22:17 2016 +0000
@@ -12,6 +12,7 @@
     if (_abort)
         block=false;
     int oldval;
+/*    
 #if defined(TARGET_LPC1768) // on Cortex-M3 we can use ldrex/strex
     do {
         // read the semaphore value
@@ -21,14 +22,18 @@
     } while ( (block && oldval == SemTaken) || __strex(SemTaken, &s) != 0 );
     if ( !block ) __clrex(); // clear exclusive lock set by ldrex
 #else // on arm7 there's only swp
+
     do {
         // swp sets the pointed data to the given value and returns the previous one
         oldval = __swp(SemTaken, &s);
         // if blocking, loop until the previous value becomes 0
         // which would mean we have successfully taken the lock
     } while (block && oldval == SemTaken);
-#endif
+//#endif
+
     return oldval == SemFree;
+*/
+return true;    
 }
 
 // release the semaphore