[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/interfaces/private ResourceTransfer.nc, 1.1, 1.2 ResourceTransferred.nc, 1.2, 1.3

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Tue Oct 21 10:29:02 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/interfaces/private
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11326/tos/lib/mac/tkn154/interfaces/private

Modified Files:
	ResourceTransfer.nc ResourceTransferred.nc 
Log Message:
- moved promiscuous mode into separate component
- separated association from disassociation component
- changed ResourceTransfer.tranfer to async
- added placeholders

Index: ResourceTransfer.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/interfaces/private/ResourceTransfer.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResourceTransfer.nc	16 Jun 2008 18:00:34 -0000	1.1
--- ResourceTransfer.nc	21 Oct 2008 17:29:00 -0000	1.2
***************
*** 36,58 ****
  
    /** 
!    * Transfer control of a resource to another client. Conceptually, this
!    * command is similar to calling Resource.release() and then forcing the
!    * arbiter to signal the Resource.granted() event to the target client. But
!    * there is one difference: when a resource that was transferred through this
!    * command is released, it is released on behalf of the "original" client,
!    * i.e. who was last signalled the Resource.granted() event.  Releasing a
!    * transferred resource is thus equivalent to first transferring it back to
!    * the original client and then forcing the latter to release the resource
!    * through a call to Resource.release() -- this ensures that the arbitration
!    * policy can continue properly (and avoids possible starvation).
     *
!    * Note that a resource may be transferred multiple times, before it is
!    * released. Then the current owner will change, but the "original" client
!    * will stay the same.
     *
     * @return SUCCESS If ownership has been transferred.<br> FAIL ownership has
     * not been transferred, because the caller is not owner of the resource
     */
! 
!   async command error_t transfer();
  }
--- 36,50 ----
  
    /** 
!    * Transfers ownership of a resource to another client, which will in turn
!    * be signalled a ResourceTransferred.transferred() event. 
     *
!    * When a resource that was transferred through this command is released, it
!    * is released on behalf of the "original" client, i.e. who was last
!    * signalled the Resource.granted() event and it then depends on the original
!    * queueing policy which component will be granted the resource next.
     *
     * @return SUCCESS If ownership has been transferred.<br> FAIL ownership has
     * not been transferred, because the caller is not owner of the resource
     */
!   async command error_t transfer(); 
  }

Index: ResourceTransferred.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/interfaces/private/ResourceTransferred.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ResourceTransferred.nc	18 Jun 2008 15:45:57 -0000	1.2
--- ResourceTransferred.nc	21 Oct 2008 17:29:00 -0000	1.3
***************
*** 36,46 ****
  
    /** 
!    * Control of a resource was transferred to this component from another
!    * client. This event is similar to the Resource.granted() event, but when a
!    * the resource is released, it is released on behalf of the client who was
!    * last signalled the Resource.granted() event.
     *
     * @see ResourceTransfer interface
     */
!   event void transferred();
  }
--- 36,46 ----
  
    /** 
!    * Ownership of a resource is transferred, possibly overriding the default
!    * queueing policy. This event is similar to an async Resource.granted()
!    * event, but when a the resource is released, it is released on behalf of
!    * the client who was last signalled the Resource.granted() event.
     *
     * @see ResourceTransfer interface
     */
!   async event void transferred(); 
  }



More information about the Tinyos-2-commits mailing list