Own fork of C027_Support

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of C027_Support by u-blox

Revision:
95:8282dbbe1492
Parent:
75:ce6e12067d0c
Child:
101:edfeb8af206e
--- a/Pipe.h	Thu Jun 12 12:41:26 2014 +0000
+++ b/Pipe.h	Tue Jun 17 07:03:48 2014 +0000
@@ -1,5 +1,4 @@
 #pragma once 
-#include "Relax.h"
 
 /** pipe, this class implements a buffered pipe that can be savely 
     written and read between two context. E.g. Written from a task 
@@ -78,7 +77,7 @@
         int j = i;
         i = _inc(i);
         while (i == _r) // = !writeable() 
-            RELAX_MS(0);
+            /* nothing / just wait */;
         _b[j] = c;
         _w = i; 
         return c;
@@ -101,7 +100,7 @@
                 f = free();
                 if (f > 0) break;     // data avail
                 if (!t) return n - c; // no more space and not blocking
-                RELAX_MS(0);
+                /* nothing / just wait */;
             }
             // check free space
             if (c < f) f = c;
@@ -146,7 +145,7 @@
     {
         int r = _r;
         while (r == _w) // = !readable()
-            RELAX_MS(0);
+            /* nothing / just wait */;
         T t = _b[r];
         _r = _inc(r);
         return t;
@@ -169,7 +168,7 @@
                 f = size();
                 if (f)  break;        // free space
                 if (!t) return n - c; // no space and not blocking
-                RELAX_MS(0);
+                /* nothing / just wait */;
             }
             // check available data
             if (c < f) f = c;