[Tinyos-2-commits]
CVS: tinyos-2.x/tos/lib/tossim CpmModelC.nc, 1.3,
1.4 sim_gain.c, 1.5, 1.6
Phil Levis
scipio at users.sourceforge.net
Sat Apr 21 00:02:53 PDT 2007
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp
CtpRoutingEngineP.nc, 1.6, 1.7
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html overview.html, 1.6,
1.7 porting.html, 1.5, 1.6 tep1.html, 1.6, 1.7 tep101.html,
1.8, 1.9 tep102.html, 1.6, 1.7 tep103.html, 1.6,
1.7 tep106.html, 1.8, 1.9 tep107.html, 1.12, 1.13 tep108.html,
1.9, 1.10 tep109.html, 1.7, 1.8 tep110.html, 1.6,
1.7 tep111.html, 1.9, 1.10 tep112.html, 1.8, 1.9 tep113.html,
1.8, 1.9 tep114.html, 1.7, 1.8 tep115.html, 1.8,
1.9 tep116.html, 1.11, 1.12 tep117.html, 1.6, 1.7 tep118.html,
1.6, 1.7 tep119.html, 1.9, 1.10 tep120.html, 1.6,
1.7 tep121.html, 1.6, 1.7 tep123.html, 1.8, 1.9 tep124.html,
1.2, 1.3 tep125.html, 1.2, 1.3 tep126.html, 1.1, 1.2 tep2.html,
1.10, 1.11 tep3.html, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20059
Modified Files:
CpmModelC.nc sim_gain.c
Log Message:
Fix compilation warnings.
Index: CpmModelC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/CpmModelC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CpmModelC.nc 13 Apr 2007 17:31:49 -0000 1.3
--- CpmModelC.nc 21 Apr 2007 07:02:50 -0000 1.4
***************
*** 326,338 ****
command void Model.putOnAirTo(int dest, message_t* msg, bool ack, sim_time_t endTime, double power) {
! gain_entry_t* link = sim_gain_first(sim_node());
requestAck = ack;
outgoing = msg;
dbg("CpmModelC", "Node %i transmitting to %i, finishes at %llu.\n", sim_node(), dest, endTime);
! while (link != NULL) {
! int other = link->mote;
sim_gain_put(other, msg, endTime, ack && (other == dest), power + sim_gain_value(sim_node(), other));
! link = sim_gain_next(link);
}
}
--- 326,338 ----
command void Model.putOnAirTo(int dest, message_t* msg, bool ack, sim_time_t endTime, double power) {
! gain_entry_t* neighborEntry = sim_gain_first(sim_node());
requestAck = ack;
outgoing = msg;
dbg("CpmModelC", "Node %i transmitting to %i, finishes at %llu.\n", sim_node(), dest, endTime);
! while (neighborEntry != NULL) {
! int other = neighborEntry->mote;
sim_gain_put(other, msg, endTime, ack && (other == dest), power + sim_gain_value(sim_node(), other));
! neighborEntry = sim_gain_next(neighborEntry);
}
}
Index: sim_gain.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/sim_gain.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sim_gain.c 11 Apr 2007 01:29:44 -0000 1.5
--- sim_gain.c 21 Apr 2007 07:02:50 -0000 1.6
***************
*** 12,16 ****
gain_entry_t* sim_gain_allocate_link(int mote);
! void sim_gain_deallocate_link(gain_entry_t* link);
gain_entry_t* sim_gain_first(int src) __attribute__ ((C, spontaneous)) {
--- 12,16 ----
gain_entry_t* sim_gain_allocate_link(int mote);
! void sim_gain_deallocate_link(gain_entry_t* linkToDelete);
gain_entry_t* sim_gain_first(int src) __attribute__ ((C, spontaneous)) {
***************
*** 21,26 ****
}
! gain_entry_t* sim_gain_next(gain_entry_t* link) __attribute__ ((C, spontaneous)) {
! return link->next;
}
--- 21,26 ----
}
! gain_entry_t* sim_gain_next(gain_entry_t* currentLink) __attribute__ ((C, spontaneous)) {
! return currentLink->next;
}
***************
*** 158,170 ****
gain_entry_t* sim_gain_allocate_link(int mote) {
! gain_entry_t* link = (gain_entry_t*)malloc(sizeof(gain_entry_t));
! link->next = NULL;
! link->mote = mote;
! link->gain = -10000000.0;
! return link;
}
! void sim_gain_deallocate_link(gain_entry_t* link) __attribute__ ((C, spontaneous)) {
! free(link);
}
--- 158,170 ----
gain_entry_t* sim_gain_allocate_link(int mote) {
! gain_entry_t* newLink = (gain_entry_t*)malloc(sizeof(gain_entry_t));
! newLink->next = NULL;
! newLink->mote = mote;
! newLink->gain = -10000000.0;
! return newLink;
}
! void sim_gain_deallocate_link(gain_entry_t* linkToDelete) __attribute__ ((C, spontaneous)) {
! free(linkToDelete);
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp
CtpRoutingEngineP.nc, 1.6, 1.7
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html overview.html, 1.6,
1.7 porting.html, 1.5, 1.6 tep1.html, 1.6, 1.7 tep101.html,
1.8, 1.9 tep102.html, 1.6, 1.7 tep103.html, 1.6,
1.7 tep106.html, 1.8, 1.9 tep107.html, 1.12, 1.13 tep108.html,
1.9, 1.10 tep109.html, 1.7, 1.8 tep110.html, 1.6,
1.7 tep111.html, 1.9, 1.10 tep112.html, 1.8, 1.9 tep113.html,
1.8, 1.9 tep114.html, 1.7, 1.8 tep115.html, 1.8,
1.9 tep116.html, 1.11, 1.12 tep117.html, 1.6, 1.7 tep118.html,
1.6, 1.7 tep119.html, 1.9, 1.10 tep120.html, 1.6,
1.7 tep121.html, 1.6, 1.7 tep123.html, 1.8, 1.9 tep124.html,
1.2, 1.3 tep125.html, 1.2, 1.3 tep126.html, 1.1, 1.2 tep2.html,
1.10, 1.11 tep3.html, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list