X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fsystem%2FArbitratedReadC.nc;h=237b7fb0ffe63e49b3e593cdb156a82d5f37b278;hb=267875ef02b9446e463c6f48b0930694f1b86716;hp=ead23acc070eaafadf6b2f778a383d7a869f9709;hpb=1ba974b83d19fc41bf80acd52726f36f7f1df297;p=tinyos-2.x.git diff --git a/tos/system/ArbitratedReadC.nc b/tos/system/ArbitratedReadC.nc index ead23acc..237b7fb0 100644 --- a/tos/system/ArbitratedReadC.nc +++ b/tos/system/ArbitratedReadC.nc @@ -20,7 +20,7 @@ * * @author David Gay */ -generic module ArbitratedReadC(typedef width_t) { +generic module ArbitratedReadC(typedef width_t) @safe() { provides interface Read[uint8_t client]; uses { interface Read as Service[uint8_t client]; @@ -29,12 +29,7 @@ generic module ArbitratedReadC(typedef width_t) { } implementation { command error_t Read.read[uint8_t client]() { -#if 1 return call Resource.request[client](); -#else - signal Resource.granted[client](); - return SUCCESS; -#endif } event void Resource.granted[uint8_t client]() { @@ -49,7 +44,7 @@ implementation { default async command error_t Resource.request[uint8_t client]() { return FAIL; } - default async command void Resource.release[uint8_t client]() { } + default async command error_t Resource.release[uint8_t client]() { return FAIL; } default event void Read.readDone[uint8_t client](error_t result, width_t data) { } default command error_t Service.read[uint8_t client]() { return SUCCESS;