X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fsystem%2FSimpleArbiterP.nc;h=30f185f2e99926602161b29f6652717f326437a4;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=91d883a0bce74daf3b097ebe5d4437be276496be;hpb=12ab8ebcade3a0ecd693c71e63e04cc857111776;p=tinyos-2.x.git diff --git a/tos/system/SimpleArbiterP.nc b/tos/system/SimpleArbiterP.nc index 91d883a0..30f185f2 100644 --- a/tos/system/SimpleArbiterP.nc +++ b/tos/system/SimpleArbiterP.nc @@ -46,7 +46,7 @@ * @author Philip Levis */ -generic module SimpleArbiterP() { +generic module SimpleArbiterP() @safe() { provides { interface Resource[uint8_t id]; interface ResourceRequested[uint8_t id]; @@ -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();