[Tinyos Core WG] proposal for some (small) changes in the core

Jan Hauer jan.hauer at gmail.com
Tue May 27 09:57:08 PDT 2008


Here is a short list of things I would like to change/fix in the core,
to make the integration of my TKN15.4 implementation easier (I ordered
them by increasing level of expected controversy ;)

(1) fix tos/lib/timer/VirtualizeAlarmC.nc to work with uint32_t on
msp430 platforms like proposed in my email to tinyos-devel on Mar 4
(and re-printed below (*)).
(2) provide an Init interface from tos/system/PoolC and QueueC
component (for resetting state, respectively)
(3) include ENOACK (denoting a missing acknowledgement) into the error_t codes.
(4) I adapted some general-purpose interfaces that might be
interesting to others and could be included in tos/interfaces: (a)
interface GetNow/SetNow, which is an async Get/Set, (b)
AsyncSplitControl, which is an async SplitControl

Basically, I'm fine if we can agree on (1) and (2).
Jan


(*) There is problem with tos/lib/timer/VirtualizeAlarmC.nc on msp430:
with mspgcc-3.2.3 I get a "Segmentation fault" during compilation if I
use uint32_t as "size_type", e.g. "VirtualizeAlarmC(T32khz, uint32_t,
uniqueCount(UQ_ALARM_32KHZ32));". The probelm is in line 135 of
VirtualizeAlarmC. Currently lines 134-136 read:

if( m.isset[id] ) {
 size_type elapsed = call AlarmFrom.getNow() - m.alarm[id].t0;
 if( m.alarm[id].dt <= elapsed ) {

I don't understand the actual cause, but when I replace this with the
following code it compiles:

 if( m.isset[id] ) {
 size_type t0 = m.alarm[id].t0;
 size_type elapsed = call AlarmFrom.getNow() - t0;
   if( m.alarm[id].dt <= elapsed ) {

This fix should not have any impacts for other platforms, so I suggest
to use it as a workaround.


More information about the Tinyos-2.0wg mailing list