[Tinyos-2-commits] CVS: tinyos-2.x/tos/system ArbiterP.nc,1.2,1.3
Kevin Klues
klueska at users.sourceforge.net
Sun Feb 4 11:56:38 PST 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/system
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6826/tos/system
Modified Files:
ArbiterP.nc
Log Message:
Update of files to align them with TEP108 changes to ResourceController interface to rename it to ResourceDefaultOwner. TEP103 hasn't been altered, and we still need to decide what should be done with it exactly.
Index: ArbiterP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/system/ArbiterP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ArbiterP.nc 6 Nov 2006 11:57:19 -0000 1.2
--- ArbiterP.nc 4 Feb 2007 19:56:36 -0000 1.3
***************
*** 33,37 ****
*
* This component provides the Resource, ResourceRequested, ArbiterInfo,
! * and ResourceController interfaces and uses the ResourceConfigure interface as
* described in TEP 108. It provides arbitration to a shared resource.
* An Queue is used to keep track of which users have put
--- 33,37 ----
*
* This component provides the Resource, ResourceRequested, ArbiterInfo,
! * and ResourceDefaultOwner interfaces and uses the ResourceConfigure interface as
* described in TEP 108. It provides arbitration to a shared resource.
* An Queue is used to keep track of which users have put
***************
*** 39,43 ****
* of these users, the queue is checked and the next user
* that has a pending request will ge granted control of the resource. If
! * there are no pending requests, then the user of the ResourceController
* interface gains access to the resource, and holds onto it until
* another user makes a request.
--- 39,43 ----
* of these users, the queue is checked and the next user
* that has a pending request will ge granted control of the resource. If
! * there are no pending requests, then the user of the ResourceDefaultOwner
* interface gains access to the resource, and holds onto it until
* another user makes a request.
***************
*** 53,57 ****
interface Resource[uint8_t id];
interface ResourceRequested[uint8_t id];
! interface ResourceController;
interface ArbiterInfo;
}
--- 53,57 ----
interface Resource[uint8_t id];
interface ResourceRequested[uint8_t id];
! interface ResourceDefaultOwner;
interface ArbiterInfo;
}
***************
*** 82,86 ****
else return call Queue.enqueue(id);
}
! signal ResourceController.requested();
return SUCCESS;
}
--- 82,86 ----
else return call Queue.enqueue(id);
}
! signal ResourceDefaultOwner.requested();
return SUCCESS;
}
***************
*** 95,99 ****
else return FAIL;
}
! signal ResourceController.immediateRequested();
if(resId == id) {
call ResourceConfigure.configure[resId]();
--- 95,99 ----
else return FAIL;
}
! signal ResourceDefaultOwner.immediateRequested();
if(resId == id) {
call ResourceConfigure.configure[resId]();
***************
*** 115,119 ****
resId = CONTROLLER_ID;
state = RES_CONTROLLED;
! signal ResourceController.granted();
}
call ResourceConfigure.unconfigure[id]();
--- 115,119 ----
resId = CONTROLLER_ID;
state = RES_CONTROLLED;
! signal ResourceDefaultOwner.granted();
}
call ResourceConfigure.unconfigure[id]();
***************
*** 123,127 ****
}
! async command error_t ResourceController.release() {
atomic {
if(resId == CONTROLLER_ID) {
--- 123,127 ----
}
! async command error_t ResourceDefaultOwner.release() {
atomic {
if(resId == CONTROLLER_ID) {
***************
*** 166,170 ****
}
! async command uint8_t ResourceController.isOwner() {
return call Resource.isOwner[CONTROLLER_ID]();
}
--- 166,170 ----
}
! async command uint8_t ResourceDefaultOwner.isOwner() {
return call Resource.isOwner[CONTROLLER_ID]();
}
***************
*** 188,198 ****
default async event void ResourceRequested.immediateRequested[uint8_t id]() {
}
! default async event void ResourceController.granted() {
}
! default async event void ResourceController.requested() {
! call ResourceController.release();
}
! default async event void ResourceController.immediateRequested() {
! call ResourceController.release();
}
default async command void ResourceConfigure.configure[uint8_t id]() {
--- 188,198 ----
default async event void ResourceRequested.immediateRequested[uint8_t id]() {
}
! default async event void ResourceDefaultOwner.granted() {
}
! default async event void ResourceDefaultOwner.requested() {
! call ResourceDefaultOwner.release();
}
! default async event void ResourceDefaultOwner.immediateRequested() {
! call ResourceDefaultOwner.release();
}
default async command void ResourceConfigure.configure[uint8_t id]() {
More information about the Tinyos-2-commits
mailing list