From: r-studio Date: Thu, 15 Apr 2010 12:10:54 +0000 (+0000) Subject: Inserted a check into Resource.request() that controls if the current caller id has... X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=96a0ff3c723efba275d33cd2d6e459a83b0a647c;p=tinyos-2.x.git Inserted a check into Resource.request() that controls if the current caller id has a granted signal pending. This will prevent the caller to be inserted into the request queue which makes sense because the caller is the next one to be granted the resource. This fixes a problem which prevented the RF230 driver from accessing the Spi bus when ActiveMessageAddress.changed() was signaled in the case of a ID change when using tosboot. This prevented the startup procedure to continue. --- diff --git a/tos/system/ArbiterP.nc b/tos/system/ArbiterP.nc index b07f975d..bf66c2c5 100644 --- a/tos/system/ArbiterP.nc +++ b/tos/system/ArbiterP.nc @@ -81,6 +81,9 @@ implementation { state = RES_GRANTING; reqResId = id; } + else if (reqResId == id) { + return SUCCESS; + } else return call Queue.enqueue(id); } signal ResourceDefaultOwner.requested();