[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/serial SerialActiveMessageP.nc, 1.8, 1.9 SerialDispatcherP.nc, 1.6, 1.7
John Regehr
regehr at users.sourceforge.net
Tue Jun 3 20:43:55 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/interfaces AMPacket.nc, 1.5, 1.6 AMSend.nc, 1.5, 1.6 BlockRead.nc, 1.4, 1.5 BlockWrite.nc, 1.5, 1.6 ConfigStorage.nc, 1.4, 1.5 Crc.nc, 1.2, 1.3 CsmaBackoff.nc, 1.2, 1.3 I2CPacket.nc, 1.5, 1.6 Intercept.nc, 1.5, 1.6 InternalFlash.nc, 1.1, 1.2 LinkPacketMetadata.nc, 1.1, 1.2 LogRead.nc, 1.4, 1.5 LogWrite.nc, 1.4, 1.5 LowPowerListening.nc, 1.1, 1.2 Packet.nc, 1.6, 1.7 PacketAcknowledgements.nc, 1.2, 1.3 PacketLink.nc, 1.1, 1.2 Pool.nc, 1.4, 1.5 Queue.nc, 1.4, 1.5 RadioTimeStamping.nc, 1.2, 1.3 ReadRef.nc, 1.4, 1.5 ReadStream.nc, 1.4, 1.5 Receive.nc, 1.5, 1.6 Send.nc, 1.5, 1.6 SendNotifier.nc, 1.1, 1.2 SpiPacket.nc, 1.4, 1.5 UartByte.nc, 1.4, 1.5 UartStream.nc, 1.4, 1.5
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/safe/include annots_stage1.h, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/serial
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23790
Modified Files:
SerialActiveMessageP.nc SerialDispatcherP.nc
Log Message:
safe tinyos annotations
Index: SerialActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialActiveMessageP.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SerialActiveMessageP.nc 19 Feb 2008 22:00:08 -0000 1.8
--- SerialActiveMessageP.nc 4 Jun 2008 03:43:50 -0000 1.9
***************
*** 47,52 ****
implementation {
! serial_header_t* getHeader(message_t* msg) {
! return (serial_header_t*)(msg->data - sizeof(serial_header_t));
}
--- 47,52 ----
implementation {
! serial_header_t* ONE getHeader(message_t* ONE msg) {
! return TCAST(serial_header_t* ONE, (uint8_t*)msg + offsetof(message_t, data) - sizeof(serial_header_t));
}
***************
*** 122,126 ****
}
else {
! return msg->data;
}
}
--- 122,126 ----
}
else {
! return (void * COUNT_NOK(len))msg->data;
}
}
Index: SerialDispatcherP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialDispatcherP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SerialDispatcherP.nc 13 Sep 2007 23:10:19 -0000 1.6
--- SerialDispatcherP.nc 4 Jun 2008 03:43:53 -0000 1.7
***************
*** 76,87 ****
/* This component provides double buffering. */
message_t messages[2]; // buffer allocation
! message_t* messagePtrs[2] = { &messages[0], &messages[1]};
// We store a separate receiveBuffer variable because indexing
// into a pointer array can be costly, and handling interrupts
// is time critical.
! uint8_t* receiveBuffer = (uint8_t*)(&messages[0]);
! uint8_t *sendBuffer = NULL;
send_state_t sendState = SEND_STATE_IDLE;
uint8_t sendLen = 0;
--- 76,87 ----
/* This component provides double buffering. */
message_t messages[2]; // buffer allocation
! message_t* ONE messagePtrs[2] = { &messages[0], &messages[1]};
// We store a separate receiveBuffer variable because indexing
// into a pointer array can be costly, and handling interrupts
// is time critical.
! uint8_t* COUNT_NOK(sizeof(message_t)) receiveBuffer = (uint8_t* COUNT_NOK(sizeof(message_t)))(&messages[0]);
! uint8_t *COUNT_NOK(sizeof(message_t)) sendBuffer = NULL;
send_state_t sendState = SEND_STATE_IDLE;
uint8_t sendLen = 0;
***************
*** 95,99 ****
uart_id_t receiveTaskType = 0;
uint8_t receiveTaskWhich;
! message_t *receiveTaskBuf = NULL;
uint8_t receiveTaskSize = 0;
--- 95,99 ----
uart_id_t receiveTaskType = 0;
uint8_t receiveTaskWhich;
! message_t * ONE_NOK receiveTaskBuf = NULL;
uint8_t receiveTaskSize = 0;
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/interfaces AMPacket.nc, 1.5, 1.6 AMSend.nc, 1.5, 1.6 BlockRead.nc, 1.4, 1.5 BlockWrite.nc, 1.5, 1.6 ConfigStorage.nc, 1.4, 1.5 Crc.nc, 1.2, 1.3 CsmaBackoff.nc, 1.2, 1.3 I2CPacket.nc, 1.5, 1.6 Intercept.nc, 1.5, 1.6 InternalFlash.nc, 1.1, 1.2 LinkPacketMetadata.nc, 1.1, 1.2 LogRead.nc, 1.4, 1.5 LogWrite.nc, 1.4, 1.5 LowPowerListening.nc, 1.1, 1.2 Packet.nc, 1.6, 1.7 PacketAcknowledgements.nc, 1.2, 1.3 PacketLink.nc, 1.1, 1.2 Pool.nc, 1.4, 1.5 Queue.nc, 1.4, 1.5 RadioTimeStamping.nc, 1.2, 1.3 ReadRef.nc, 1.4, 1.5 ReadStream.nc, 1.4, 1.5 Receive.nc, 1.5, 1.6 Send.nc, 1.5, 1.6 SendNotifier.nc, 1.1, 1.2 SpiPacket.nc, 1.4, 1.5 UartByte.nc, 1.4, 1.5 UartStream.nc, 1.4, 1.5
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/safe/include annots_stage1.h, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list