]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Update to set resId to 0xFF while granting
authorklueska <klueska>
Fri, 15 Aug 2008 16:41:19 +0000 (16:41 +0000)
committerklueska <klueska>
Fri, 15 Aug 2008 16:41:19 +0000 (16:41 +0000)
tos/system/ArbiterP.nc
tos/system/SimpleArbiterP.nc

index f7b2fcedab33f221b78ada452ab1a10c46efed2f..b07f975dc4e5b2b2e762a90c020aff7772ec43cf 100644 (file)
@@ -110,6 +110,7 @@ implementation {
       if(state == RES_BUSY && resId == id) {
         if(call Queue.isEmpty() == FALSE) {
           reqResId = call Queue.dequeue();
+          resId = NO_RES;
           state = RES_GRANTING;
           post grantedTask();
           call ResourceConfigure.unconfigure[id]();
index ac4c839e40c6660866a555f1ad0e346a39229b67..30f185f2e99926602161b29f6652717f326437a4 100644 (file)
@@ -99,6 +99,7 @@ implementation {
     atomic {
       if(state == RES_BUSY && resId == id) {
         if(call Queue.isEmpty() == FALSE) {
+          resId = NO_RES;
           reqResId = call Queue.dequeue();
           state = RES_GRANTING;
           post grantedTask();