From: regehr Date: Mon, 23 Jun 2008 20:25:14 +0000 (+0000) Subject: turn on safe compilation for some modules X-Git-Tag: release_tinyos_2_1_0_0~203 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=4b9eec3a027f065b229df69e77d8ff2189b386d0 turn on safe compilation for some modules --- diff --git a/apps/BaseStation/BaseStationP.nc b/apps/BaseStation/BaseStationP.nc index 04e64c44..2e647c7f 100644 --- a/apps/BaseStation/BaseStationP.nc +++ b/apps/BaseStation/BaseStationP.nc @@ -46,7 +46,7 @@ #include "AM.h" #include "Serial.h" -module BaseStationP { +module BaseStationP @safe() { uses { interface Boot; interface SplitControl as SerialControl; diff --git a/apps/tests/msp430/Adc12/TestAdcMultiC.nc b/apps/tests/msp430/Adc12/TestAdcMultiC.nc index 53933342..2115b8bf 100644 --- a/apps/tests/msp430/Adc12/TestAdcMultiC.nc +++ b/apps/tests/msp430/Adc12/TestAdcMultiC.nc @@ -50,7 +50,7 @@ generic module TestAdcMultiC( uint8_t inch2, // second input channel uint8_t sref2 // second reference voltage -) +) @safe() { uses { interface Boot; diff --git a/apps/tests/msp430/Adc12/TestAdcSingleC.nc b/apps/tests/msp430/Adc12/TestAdcSingleC.nc index 809e4cac..e44d9ae4 100644 --- a/apps/tests/msp430/Adc12/TestAdcSingleC.nc +++ b/apps/tests/msp430/Adc12/TestAdcSingleC.nc @@ -47,7 +47,7 @@ generic module TestAdcSingleC( uint8_t sht, // sample-hold-time uint8_t sampcon_ssel, // clock source sampcon signal uint8_t sampcon_id // clock divider sampcon -) +) @safe() { uses { interface Boot; diff --git a/apps/tests/storage/Config/RandRWC.nc b/apps/tests/storage/Config/RandRWC.nc index 829c99ce..60762134 100644 --- a/apps/tests/storage/Config/RandRWC.nc +++ b/apps/tests/storage/Config/RandRWC.nc @@ -13,7 +13,7 @@ * * @author David Gay */ -module RandRWC { +module RandRWC @safe() { uses { interface Boot; interface Leds; diff --git a/apps/tutorials/RssiDemo/InterceptBase/BaseStationP.nc b/apps/tutorials/RssiDemo/InterceptBase/BaseStationP.nc index 940d9ec8..9b3d79e1 100644 --- a/apps/tutorials/RssiDemo/InterceptBase/BaseStationP.nc +++ b/apps/tutorials/RssiDemo/InterceptBase/BaseStationP.nc @@ -44,7 +44,7 @@ #include "AM.h" #include "Serial.h" -module BaseStationP { +module BaseStationP @safe() { uses { interface Boot; interface SplitControl as SerialControl; diff --git a/tos/chips/at45db/At45dbP.nc b/tos/chips/at45db/At45dbP.nc index 43fb9559..1de75c80 100644 --- a/tos/chips/at45db/At45dbP.nc +++ b/tos/chips/at45db/At45dbP.nc @@ -39,7 +39,7 @@ * @author David Gay */ -module At45dbP { +module At45dbP @safe() { provides { interface Init; interface At45db; diff --git a/tos/chips/at45db/BlockStorageP.nc b/tos/chips/at45db/BlockStorageP.nc index 3fa6a9c5..8266d4c2 100644 --- a/tos/chips/at45db/BlockStorageP.nc +++ b/tos/chips/at45db/BlockStorageP.nc @@ -39,7 +39,7 @@ #include "Storage.h" -module BlockStorageP { +module BlockStorageP @safe() { provides { interface BlockWrite[uint8_t blockId]; interface BlockRead[uint8_t blockId]; diff --git a/tos/chips/at45db/ConfigStorageP.nc b/tos/chips/at45db/ConfigStorageP.nc index 37370f7f..67bd6a8f 100644 --- a/tos/chips/at45db/ConfigStorageP.nc +++ b/tos/chips/at45db/ConfigStorageP.nc @@ -20,7 +20,7 @@ #include "Storage.h" #include "crc.h" -module ConfigStorageP { +module ConfigStorageP @safe() { provides { interface Mount[uint8_t id]; interface ConfigStorage[uint8_t id]; diff --git a/tos/chips/at45db/HplAt45dbByteC.nc b/tos/chips/at45db/HplAt45dbByteC.nc index 925f3128..46f0a520 100644 --- a/tos/chips/at45db/HplAt45dbByteC.nc +++ b/tos/chips/at45db/HplAt45dbByteC.nc @@ -22,7 +22,7 @@ * @author David Gay */ -generic module HplAt45dbByteC(int sectorSizeLog2) { +generic module HplAt45dbByteC(int sectorSizeLog2) @safe() { provides interface HplAt45db; uses { interface Resource; diff --git a/tos/chips/at45db/LogStorageP.nc b/tos/chips/at45db/LogStorageP.nc index 87656829..bf8660eb 100644 --- a/tos/chips/at45db/LogStorageP.nc +++ b/tos/chips/at45db/LogStorageP.nc @@ -38,7 +38,7 @@ * @author: Jonathan Hui */ -module LogStorageP { +module LogStorageP @safe() { provides { interface LogRead[uint8_t logId]; interface LogWrite[uint8_t logId]; diff --git a/tos/chips/atm128/Atm128UartP.nc b/tos/chips/atm128/Atm128UartP.nc index 527e264e..70b48e5a 100644 --- a/tos/chips/atm128/Atm128UartP.nc +++ b/tos/chips/atm128/Atm128UartP.nc @@ -43,7 +43,7 @@ #include -generic module Atm128UartP(){ +generic module Atm128UartP() @safe() { provides interface Init; provides interface StdControl; diff --git a/tos/chips/atm128/adc/AdcStreamP.nc b/tos/chips/atm128/adc/AdcStreamP.nc index dae467e3..b5a844f4 100644 --- a/tos/chips/atm128/adc/AdcStreamP.nc +++ b/tos/chips/atm128/adc/AdcStreamP.nc @@ -43,7 +43,7 @@ */ #include "Timer.h" -module AdcStreamP { +module AdcStreamP @safe() { provides { interface Init @atleastonce(); interface ReadStream[uint8_t client]; diff --git a/tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc b/tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc index 786f77a0..f21f061f 100644 --- a/tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc +++ b/tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc @@ -32,7 +32,7 @@ generic module HplAtm128GeneralIOPinP (uint8_t port_addr, uint8_t ddr_addr, uint8_t pin_addr, - uint8_t bit) + uint8_t bit) @safe() { provides interface GeneralIO as IO; } diff --git a/tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP.nc b/tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP.nc index 48f33d3e..a6168ff1 100644 --- a/tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP.nc +++ b/tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP.nc @@ -33,7 +33,7 @@ generic module HplAtm128GeneralIOSlowPinP (uint8_t port_addr, uint8_t ddr_addr, uint8_t pin_addr, - uint8_t bit) + uint8_t bit) @safe() { provides interface GeneralIO as IO; } diff --git a/tos/chips/atm128/pins/HplAtm128InterruptPinP.nc b/tos/chips/atm128/pins/HplAtm128InterruptPinP.nc index 36b0f030..3f94f56f 100644 --- a/tos/chips/atm128/pins/HplAtm128InterruptPinP.nc +++ b/tos/chips/atm128/pins/HplAtm128InterruptPinP.nc @@ -30,7 +30,7 @@ generic module HplAtm128InterruptPinP (uint8_t ctrl_addr, uint8_t edge0bit, uint8_t edge1bit, - uint8_t bit) + uint8_t bit) @safe() { provides interface HplAtm128Interrupt as Irq; uses interface HplAtm128InterruptSig as IrqSignal; diff --git a/tos/chips/atm128/spi/Atm128SpiP.nc b/tos/chips/atm128/spi/Atm128SpiP.nc index ffa653cc..6bec916b 100644 --- a/tos/chips/atm128/spi/Atm128SpiP.nc +++ b/tos/chips/atm128/spi/Atm128SpiP.nc @@ -72,7 +72,7 @@ * */ -module Atm128SpiP { +module Atm128SpiP @safe() { provides { interface Init; interface SpiByte; diff --git a/tos/chips/atm128/timer/HplAtm128Timer1P.nc b/tos/chips/atm128/timer/HplAtm128Timer1P.nc index 91f6ebf6..6dfcff00 100644 --- a/tos/chips/atm128/timer/HplAtm128Timer1P.nc +++ b/tos/chips/atm128/timer/HplAtm128Timer1P.nc @@ -30,7 +30,7 @@ #include -module HplAtm128Timer1P +module HplAtm128Timer1P @safe() { provides { // 16-bit Timers diff --git a/tos/chips/cc1000/CC1000ActiveMessageP.nc b/tos/chips/cc1000/CC1000ActiveMessageP.nc index 08adb203..40ecaae9 100644 --- a/tos/chips/cc1000/CC1000ActiveMessageP.nc +++ b/tos/chips/cc1000/CC1000ActiveMessageP.nc @@ -35,7 +35,7 @@ * @date June 19 2006 */ -module CC1000ActiveMessageP { +module CC1000ActiveMessageP @safe() { provides { interface AMSend[am_id_t id]; interface Receive[am_id_t id]; diff --git a/tos/chips/cc1000/CC1000CsmaP.nc b/tos/chips/cc1000/CC1000CsmaP.nc index 505f2cfa..a462556c 100644 --- a/tos/chips/cc1000/CC1000CsmaP.nc +++ b/tos/chips/cc1000/CC1000CsmaP.nc @@ -50,7 +50,7 @@ * @author David Gay */ -module CC1000CsmaP { +module CC1000CsmaP @safe() { provides { interface Init; interface SplitControl; diff --git a/tos/chips/cc1000/CC1000SendReceiveP.nc b/tos/chips/cc1000/CC1000SendReceiveP.nc index 19700e06..24781e4f 100644 --- a/tos/chips/cc1000/CC1000SendReceiveP.nc +++ b/tos/chips/cc1000/CC1000SendReceiveP.nc @@ -52,7 +52,7 @@ * @author David Gay */ -module CC1000SendReceiveP { +module CC1000SendReceiveP @safe() { provides { interface Init; interface StdControl; diff --git a/tos/chips/cc2420/receive/CC2420ReceiveP.nc b/tos/chips/cc2420/receive/CC2420ReceiveP.nc index fd757be5..876b1243 100644 --- a/tos/chips/cc2420/receive/CC2420ReceiveP.nc +++ b/tos/chips/cc2420/receive/CC2420ReceiveP.nc @@ -40,7 +40,7 @@ #include "message.h" #include "AM.h" -module CC2420ReceiveP { +module CC2420ReceiveP @safe() { provides interface Init; provides interface StdControl; diff --git a/tos/chips/cc2420/spi/CC2420SpiP.nc b/tos/chips/cc2420/spi/CC2420SpiP.nc index 82498919..d725e6f0 100644 --- a/tos/chips/cc2420/spi/CC2420SpiP.nc +++ b/tos/chips/cc2420/spi/CC2420SpiP.nc @@ -38,7 +38,7 @@ * @version $Revision$ $Date$ */ -module CC2420SpiP { +module CC2420SpiP @safe() { provides { interface ChipSpiResource; diff --git a/tos/chips/cc2420/transmit/CC2420TransmitP.nc b/tos/chips/cc2420/transmit/CC2420TransmitP.nc index 7c07cab7..a571fc70 100644 --- a/tos/chips/cc2420/transmit/CC2420TransmitP.nc +++ b/tos/chips/cc2420/transmit/CC2420TransmitP.nc @@ -41,7 +41,7 @@ #include "crc.h" #include "message.h" -module CC2420TransmitP { +module CC2420TransmitP @safe() { provides interface Init; provides interface StdControl; diff --git a/tos/chips/msp430/adc12/AdcP.nc b/tos/chips/msp430/adc12/AdcP.nc index f7ae2cb1..620f480a 100644 --- a/tos/chips/msp430/adc12/AdcP.nc +++ b/tos/chips/msp430/adc12/AdcP.nc @@ -33,7 +33,7 @@ * ======================================================================== */ -module AdcP { +module AdcP @safe() { provides { interface Read as Read[uint8_t client]; interface ReadNow as ReadNow[uint8_t client]; diff --git a/tos/chips/msp430/adc12/AdcStreamP.nc b/tos/chips/msp430/adc12/AdcStreamP.nc index 864f6786..7ccc83e6 100644 --- a/tos/chips/msp430/adc12/AdcStreamP.nc +++ b/tos/chips/msp430/adc12/AdcStreamP.nc @@ -43,7 +43,7 @@ */ #include "Timer.h" -module AdcStreamP { +module AdcStreamP @safe() { provides { interface Init @atleastonce(); interface ReadStream[uint8_t client]; diff --git a/tos/chips/msp430/adc12/Msp430Adc12DMAP.nc b/tos/chips/msp430/adc12/Msp430Adc12DMAP.nc index 9f98dbb8..bd8c8a0a 100644 --- a/tos/chips/msp430/adc12/Msp430Adc12DMAP.nc +++ b/tos/chips/msp430/adc12/Msp430Adc12DMAP.nc @@ -35,7 +35,7 @@ #include #include -module Msp430Adc12DMAP +module Msp430Adc12DMAP @safe() { provides { interface Msp430Adc12SingleChannel as SingleChannel[uint8_t id]; diff --git a/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc b/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc index 65ef88e0..a5df7bfe 100644 --- a/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc +++ b/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc @@ -34,7 +34,7 @@ */ #include -module Msp430Adc12ImplP +module Msp430Adc12ImplP @safe() { provides { interface Init; diff --git a/tos/chips/msp430/dma/HplMsp430DmaXP.nc b/tos/chips/msp430/dma/HplMsp430DmaXP.nc index 1c3cc218..82930f9a 100644 --- a/tos/chips/msp430/dma/HplMsp430DmaXP.nc +++ b/tos/chips/msp430/dma/HplMsp430DmaXP.nc @@ -63,7 +63,7 @@ generic module HplMsp430DmaXP( uint16_t DMAxCTL_addr, uint16_t DMAxDA_addr, uint16_t DMAxSZ_addr, uint16_t DMAxTSEL_mask, - uint16_t DMAxTSEL_shift ) { + uint16_t DMAxTSEL_shift ) @safe() { provides interface HplMsp430DmaChannel as DMA; uses interface HplMsp430DmaInterrupt as Interrupt; diff --git a/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc b/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc index 34debff4..38f6f4b5 100644 --- a/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc +++ b/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc @@ -31,7 +31,7 @@ generic module HplMsp430GeneralIOP( uint8_t port_dir_addr, uint8_t port_sel_addr, uint8_t pin - ) + ) @safe() { provides interface HplMsp430GeneralIO as IO; } diff --git a/tos/chips/msp430/timer/Msp430TimerCapComP.nc b/tos/chips/msp430/timer/Msp430TimerCapComP.nc index 5ae8695a..548aecc3 100644 --- a/tos/chips/msp430/timer/Msp430TimerCapComP.nc +++ b/tos/chips/msp430/timer/Msp430TimerCapComP.nc @@ -28,7 +28,7 @@ generic module Msp430TimerCapComP( uint16_t TxCCTLx_addr, uint16_t TxCCRx_addr - ) + ) @safe() { provides interface Msp430TimerControl as Control; provides interface Msp430Compare as Compare;