]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/system/FcfsResourceQueueC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / system / FcfsResourceQueueC.nc
index 7be5ed485a22f819d6247418a098ce601f9f0115..23e41dd26a5c4077b7f11f6a9dadd3e266253c9d 100644 (file)
@@ -29,7 +29,7 @@
  
 #include "Resource.h"
  
-generic module FcfsResourceQueueC(uint8_t size) {
+generic module FcfsResourceQueueC(uint8_t size) @safe() {
   provides {
     interface Init;
     interface ResourceQueue as FcfsQueue;
@@ -48,11 +48,11 @@ implementation {
   }  
   
   async command bool FcfsQueue.isEmpty() {
-    return (qHead == NO_ENTRY);
+    atomic return (qHead == NO_ENTRY);
   }
        
   async command bool FcfsQueue.isEnqueued(resource_client_id_t id) {
-       return resQ[id] != NO_ENTRY || qTail == id; 
+       atomic return resQ[id] != NO_ENTRY || qTail == id; 
   }
 
   async command resource_client_id_t FcfsQueue.dequeue() {