]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Made it a little more async friendly
authorrincon <rincon>
Thu, 14 Jun 2007 04:39:02 +0000 (04:39 +0000)
committerrincon <rincon>
Thu, 14 Jun 2007 04:39:02 +0000 (04:39 +0000)
tos/system/ActiveMessageAddressC.nc

index 098c26d0a16fd54edec1a26ef9720905c4ef3de3..40f0c0fe0c716b1a1015438aa18c1b02a7a7f46a 100644 (file)
@@ -75,7 +75,9 @@ implementation {
    * @return the group address of this node
    */
   async command am_group_t ActiveMessageAddress.amGroup() {
-    return group;
+    am_group_t myGroup;
+    atomic myGroup = group;
+    return myGroup;
   }
   
   /**
@@ -83,7 +85,7 @@ implementation {
    * @param group The group address
    */
   async command void ActiveMessageAddress.setAmGroup(am_group_t myGroup) {
-    group = myGroup;
+    atomic group = myGroup;
     signal ActiveMessageAddress.changed();
   }
 
@@ -94,7 +96,9 @@ implementation {
    * @deprecated Use ActiveMessageAddress.amAddress() instead
    */
   async command am_addr_t amAddress() {
-    return addr;
+    am_addr_t myAddr;
+    atomic myAddr = addr;
+    return myAddr;
   }
   
   /**
@@ -104,7 +108,7 @@ implementation {
    * @deprecated Use ActiveMessageAddress.setAmAddress() instead
    */
   async command void setAmAddress(am_addr_t a) {
-    addr = a;
+    atomic addr = a;
     signal ActiveMessageAddress.changed();
   }