From: regehr Date: Tue, 24 Jun 2008 05:32:31 +0000 (+0000) Subject: mark more modules as safe code X-Git-Tag: release_tinyos_2_1_0_0~185 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=816c22929992f22955bffe07b387128922cbd0a5 mark more modules as safe code --- diff --git a/apps/RadioCountToLeds/RadioCountToLedsC.nc b/apps/RadioCountToLeds/RadioCountToLedsC.nc index fcc3c7c6..be2b4886 100644 --- a/apps/RadioCountToLeds/RadioCountToLedsC.nc +++ b/apps/RadioCountToLeds/RadioCountToLedsC.nc @@ -43,7 +43,7 @@ * @date June 6 2005 */ -module RadioCountToLedsC { +module RadioCountToLedsC @safe() { uses { interface Leds; interface Boot; diff --git a/tos/chips/cc2420/CC2420ActiveMessageP.nc b/tos/chips/cc2420/CC2420ActiveMessageP.nc index 374f1dad..be409637 100644 --- a/tos/chips/cc2420/CC2420ActiveMessageP.nc +++ b/tos/chips/cc2420/CC2420ActiveMessageP.nc @@ -34,7 +34,7 @@ #include "CC2420.h" -module CC2420ActiveMessageP { +module CC2420ActiveMessageP @safe() { provides { interface AMSend[am_id_t id]; interface Receive[am_id_t id]; diff --git a/tos/chips/cc2420/packet/CC2420PacketP.nc b/tos/chips/cc2420/packet/CC2420PacketP.nc index 41002d5b..9bca8ae4 100644 --- a/tos/chips/cc2420/packet/CC2420PacketP.nc +++ b/tos/chips/cc2420/packet/CC2420PacketP.nc @@ -39,7 +39,7 @@ #include "message.h" #include "CC2420.h" -module CC2420PacketP { +module CC2420PacketP @safe() { provides { interface CC2420Packet; diff --git a/tos/chips/cc2420/unique/UniqueReceiveP.nc b/tos/chips/cc2420/unique/UniqueReceiveP.nc index 69aabcb8..445848ea 100644 --- a/tos/chips/cc2420/unique/UniqueReceiveP.nc +++ b/tos/chips/cc2420/unique/UniqueReceiveP.nc @@ -38,7 +38,7 @@ #include "CC2420.h" -module UniqueReceiveP { +module UniqueReceiveP @safe() { provides { interface Receive; interface Receive as DuplicateReceive; diff --git a/tos/chips/cc2420/unique/UniqueSendP.nc b/tos/chips/cc2420/unique/UniqueSendP.nc index 7b68edfe..64cbfda0 100644 --- a/tos/chips/cc2420/unique/UniqueSendP.nc +++ b/tos/chips/cc2420/unique/UniqueSendP.nc @@ -35,7 +35,7 @@ * @author David Moss */ -module UniqueSendP { +module UniqueSendP @safe() { provides { interface Send; interface Init; diff --git a/tos/chips/msp430/pins/HplMsp430InterruptP.nc b/tos/chips/msp430/pins/HplMsp430InterruptP.nc index 9b1b1f21..26918456 100644 --- a/tos/chips/msp430/pins/HplMsp430InterruptP.nc +++ b/tos/chips/msp430/pins/HplMsp430InterruptP.nc @@ -22,7 +22,7 @@ /** * @author Joe Polastre */ -module HplMsp430InterruptP +module HplMsp430InterruptP @safe() { #ifdef __msp430_have_port1 provides interface HplMsp430Interrupt as Port10; diff --git a/tos/chips/msp430/timer/Msp430ClockP.nc b/tos/chips/msp430/timer/Msp430ClockP.nc index 080facc7..55aaba33 100644 --- a/tos/chips/msp430/timer/Msp430ClockP.nc +++ b/tos/chips/msp430/timer/Msp430ClockP.nc @@ -29,7 +29,7 @@ #include "Msp430Timer.h" -module Msp430ClockP +module Msp430ClockP @safe() { provides interface Init; provides interface Msp430ClockInit; diff --git a/tos/chips/msp430/usart/HplMsp430I2C0P.nc b/tos/chips/msp430/usart/HplMsp430I2C0P.nc index 3279016c..72bdbe4e 100644 --- a/tos/chips/msp430/usart/HplMsp430I2C0P.nc +++ b/tos/chips/msp430/usart/HplMsp430I2C0P.nc @@ -34,7 +34,7 @@ * @version $Revision$ $Date$ */ -module HplMsp430I2C0P { +module HplMsp430I2C0P @safe() { provides interface HplMsp430I2C as HplI2C; diff --git a/tos/chips/msp430/usart/HplMsp430Usart0P.nc b/tos/chips/msp430/usart/HplMsp430Usart0P.nc index cf618bfb..df07cd47 100644 --- a/tos/chips/msp430/usart/HplMsp430Usart0P.nc +++ b/tos/chips/msp430/usart/HplMsp430Usart0P.nc @@ -71,7 +71,7 @@ * @version $Revision$ $Date$ */ -module HplMsp430Usart0P { +module HplMsp430Usart0P @safe() { provides interface HplMsp430Usart as Usart; provides interface HplMsp430UsartInterrupts as Interrupts; provides interface HplMsp430I2CInterrupts as I2CInterrupts; diff --git a/tos/lib/timer/AlarmToTimerC.nc b/tos/lib/timer/AlarmToTimerC.nc index 64b9ea1c..2bdecc63 100644 --- a/tos/lib/timer/AlarmToTimerC.nc +++ b/tos/lib/timer/AlarmToTimerC.nc @@ -32,7 +32,7 @@ * @author Cory Sharp */ -generic module AlarmToTimerC(typedef precision_tag) +generic module AlarmToTimerC(typedef precision_tag) @safe() { provides interface Timer; uses interface Alarm; diff --git a/tos/lib/timer/VirtualizeTimerC.nc b/tos/lib/timer/VirtualizeTimerC.nc index 4aa7c222..4f3f109b 100644 --- a/tos/lib/timer/VirtualizeTimerC.nc +++ b/tos/lib/timer/VirtualizeTimerC.nc @@ -32,7 +32,7 @@ * @author Cory Sharp */ -generic module VirtualizeTimerC(typedef precision_tag, int max_timers) +generic module VirtualizeTimerC(typedef precision_tag, int max_timers) @safe() { provides interface Timer as Timer[uint8_t num]; uses interface Timer as TimerFrom; diff --git a/tos/platforms/telosa/PlatformP.nc b/tos/platforms/telosa/PlatformP.nc index 93c1b6fd..34490d65 100644 --- a/tos/platforms/telosa/PlatformP.nc +++ b/tos/platforms/telosa/PlatformP.nc @@ -1,6 +1,6 @@ #include "hardware.h" -module PlatformP{ +module PlatformP @safe() { provides interface Init; uses interface Init as MoteClockInit; uses interface Init as MoteInit; diff --git a/tos/platforms/telosb/MotePlatformC.nc b/tos/platforms/telosb/MotePlatformC.nc index 623144f3..1ba21eac 100644 --- a/tos/platforms/telosb/MotePlatformC.nc +++ b/tos/platforms/telosb/MotePlatformC.nc @@ -1,4 +1,4 @@ -module MotePlatformC { +module MotePlatformC @safe() { provides interface Init; } implementation { diff --git a/tos/system/AMQueueEntryP.nc b/tos/system/AMQueueEntryP.nc index 2f96c394..0cd9b185 100644 --- a/tos/system/AMQueueEntryP.nc +++ b/tos/system/AMQueueEntryP.nc @@ -32,7 +32,7 @@ #include "AM.h" -generic module AMQueueEntryP(am_id_t amId) { +generic module AMQueueEntryP(am_id_t amId) @safe() { provides interface AMSend; uses{ interface Send; diff --git a/tos/system/AMQueueImplP.nc b/tos/system/AMQueueImplP.nc index 02e41d77..a4c4eaf5 100644 --- a/tos/system/AMQueueImplP.nc +++ b/tos/system/AMQueueImplP.nc @@ -34,7 +34,7 @@ #include "AM.h" -generic module AMQueueImplP(int numClients) { +generic module AMQueueImplP(int numClients) @safe() { provides interface Send[uint8_t client]; uses{ interface AMSend[am_id_t id]; diff --git a/tos/system/ActiveMessageAddressC.nc b/tos/system/ActiveMessageAddressC.nc index b7cb3ea1..ae0aafbf 100644 --- a/tos/system/ActiveMessageAddressC.nc +++ b/tos/system/ActiveMessageAddressC.nc @@ -38,7 +38,7 @@ * @author David Moss */ -module ActiveMessageAddressC { +module ActiveMessageAddressC @safe() { provides { interface ActiveMessageAddress; async command am_addr_t amAddress(); diff --git a/tos/system/ArbiterP.nc b/tos/system/ArbiterP.nc index bffe84c0..f7b2fced 100644 --- a/tos/system/ArbiterP.nc +++ b/tos/system/ArbiterP.nc @@ -49,7 +49,7 @@ * @author Philip Levis */ -generic module ArbiterP(uint8_t default_owner_id) { +generic module ArbiterP(uint8_t default_owner_id) @safe() { provides { interface Resource[uint8_t id]; interface ResourceRequested[uint8_t id]; diff --git a/tos/system/FcfsResourceQueueC.nc b/tos/system/FcfsResourceQueueC.nc index 7be5ed48..565ba25f 100644 --- a/tos/system/FcfsResourceQueueC.nc +++ b/tos/system/FcfsResourceQueueC.nc @@ -29,7 +29,7 @@ #include "Resource.h" -generic module FcfsResourceQueueC(uint8_t size) { +generic module FcfsResourceQueueC(uint8_t size) @safe() { provides { interface Init; interface ResourceQueue as FcfsQueue; diff --git a/tos/system/LedsP.nc b/tos/system/LedsP.nc index a261cd9e..3a3d4814 100644 --- a/tos/system/LedsP.nc +++ b/tos/system/LedsP.nc @@ -30,7 +30,7 @@ * @date March 21, 2005 */ -module LedsP { +module LedsP @safe() { provides { interface Init; interface Leds; diff --git a/tos/system/RandomMlcgC.nc b/tos/system/RandomMlcgC.nc index 25a2b6c0..3e6a3f41 100644 --- a/tos/system/RandomMlcgC.nc +++ b/tos/system/RandomMlcgC.nc @@ -31,7 +31,7 @@ * @date March 1 2005 */ -module RandomMlcgC { +module RandomMlcgC @safe() { provides interface Init; provides interface ParameterInit as SeedInit; provides interface Random; diff --git a/tos/system/SchedulerBasicP.nc b/tos/system/SchedulerBasicP.nc index 983b2315..d80968ed 100644 --- a/tos/system/SchedulerBasicP.nc +++ b/tos/system/SchedulerBasicP.nc @@ -40,7 +40,7 @@ #include "hardware.h" -module SchedulerBasicP { +module SchedulerBasicP @safe() { provides interface Scheduler; provides interface TaskBasic[uint8_t id]; uses interface McuSleep; diff --git a/tos/system/StateImplP.nc b/tos/system/StateImplP.nc index cfd5d5d4..3883ac15 100644 --- a/tos/system/StateImplP.nc +++ b/tos/system/StateImplP.nc @@ -61,7 +61,7 @@ #include "State.h" -module StateImplP { +module StateImplP @safe() { provides { interface Init; interface State[uint8_t id];