[Tinyos-2-commits] CVS: tinyos-2.x/tos/system ArbiterP.nc, 1.4,
1.5 SimpleArbiterP.nc, 1.2, 1.3
Kevin Klues
klueska at users.sourceforge.net
Sun Apr 15 13:33:36 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/system
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv1525
Modified Files:
ArbiterP.nc SimpleArbiterP.nc
Log Message:
Update of documentation on ArbiterP
Index: ArbiterP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/system/ArbiterP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ArbiterP.nc 15 Apr 2007 20:28:25 -0000 1.4
--- ArbiterP.nc 15 Apr 2007 20:33:34 -0000 1.5
***************
*** 35,39 ****
* 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
* in requests for the resource. Upon the release of the resource by one
* of these users, the queue is checked and the next user
--- 35,39 ----
* and ResourceDefaultOwner interfaces and uses the ResourceConfigure interface as
* described in TEP 108. It provides arbitration to a shared resource.
! * A Queue is used to keep track of which users have put
* in requests for the resource. Upon the release of the resource by one
* of these users, the queue is checked and the next user
***************
*** 43,47 ****
* another user makes a request.
*
! * @param <b>controller_id</b> -- The unique id of the resource being arbitrated
*
* @author Kevin Klues (klues at tkn.tu-berlin.de)
--- 43,48 ----
* another user makes a request.
*
! * @param <b>default_owner_id</b> -- The id of the default owner of this
! * resource
*
* @author Kevin Klues (klues at tkn.tu-berlin.de)
***************
*** 49,53 ****
*/
! generic module ArbiterP(uint8_t controller_id) {
provides {
interface Resource[uint8_t id];
--- 50,54 ----
*/
! generic module ArbiterP(uint8_t default_owner_id) {
provides {
interface Resource[uint8_t id];
***************
*** 65,72 ****
enum {RES_CONTROLLED, RES_GRANTING, RES_IMM_GRANTING, RES_BUSY};
! enum {CONTROLLER_ID = controller_id};
uint8_t state = RES_CONTROLLED;
! norace uint8_t resId = CONTROLLER_ID;
norace uint8_t reqResId;
--- 66,73 ----
enum {RES_CONTROLLED, RES_GRANTING, RES_IMM_GRANTING, RES_BUSY};
! enum {default_owner_id = default_owner_id};
uint8_t state = RES_CONTROLLED;
! norace uint8_t resId = default_owner_id;
norace uint8_t reqResId;
***************
*** 113,117 ****
}
else {
! resId = CONTROLLER_ID;
state = RES_CONTROLLED;
signal ResourceDefaultOwner.granted();
--- 114,118 ----
}
else {
! resId = default_owner_id;
state = RES_CONTROLLED;
signal ResourceDefaultOwner.granted();
***************
*** 125,129 ****
async command error_t ResourceDefaultOwner.release() {
atomic {
! if(resId == CONTROLLER_ID) {
if(state == RES_GRANTING) {
post grantedTask();
--- 126,130 ----
async command error_t ResourceDefaultOwner.release() {
atomic {
! if(resId == default_owner_id) {
if(state == RES_GRANTING) {
post grantedTask();
***************
*** 167,171 ****
async command uint8_t ResourceDefaultOwner.isOwner() {
! return call Resource.isOwner[CONTROLLER_ID]();
}
--- 168,172 ----
async command uint8_t ResourceDefaultOwner.isOwner() {
! return call Resource.isOwner[default_owner_id]();
}
Index: SimpleArbiterP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/system/SimpleArbiterP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SimpleArbiterP.nc 6 Nov 2006 11:57:19 -0000 1.2
--- SimpleArbiterP.nc 15 Apr 2007 20:33:34 -0000 1.3
***************
*** 42,47 ****
* user can put in a request and immediately receive access to the
* Resource.
- *
- * @param <b>resourceName</b> -- The name of the Resource being shared
*
* @author Kevin Klues (klues at tkn.tu-berlin.de)
--- 42,45 ----
More information about the Tinyos-2-commits
mailing list