[Tinyos-devel] Bug in Resource.release?
Eric Decker
cire831 at gmail.com
Thu May 8 20:27:43 PDT 2008
async command error_t Resource.release[uint8_t id]() {
atomic {
if(state == RES_BUSY && resId == id) {
if(call Queue.isEmpty() == FALSE) {
reqResId = call Queue.dequeue();
state = RES_GRANTING;
post grantedTask();
}
else {
resId = default_owner_id;
state = RES_CONTROLLED;
signal ResourceDefaultOwner.granted();
}
call ResourceConfigure.unconfigure[id]();
}
}
return FAIL;
}
consider the case where the default owner has its own configuration that it
wants.
If it sets up its configuration when it gets signaled via the "signal
ResourceDefaultOwner.granted()"
when the call ResourceConfigure.unconfigure[id]() is called it is likely to
change the
h/w configuration out from underneath the DefaultOwner.
eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080508/69d410e5/attachment.htm
More information about the Tinyos-devel
mailing list