]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
don't use __attribute__ for nesC attributes
authoridgay <idgay>
Mon, 8 Oct 2007 20:10:05 +0000 (20:10 +0000)
committeridgay <idgay>
Mon, 8 Oct 2007 20:10:05 +0000 (20:10 +0000)
tos/chips/atm128/sim/atm128hardware.h
tos/chips/cc1000_lpl/LowPowerListening.nc
tos/chips/msp430/msp430hardware.h
tos/chips/pxa27x/pxa27xhardware.h
tos/lib/tosboot/TOSBootM.nc
tos/lib/tosboot/micaz/avrhardware.h
tos/lib/tossim/SimMainP.nc
tos/lib/tossim/SimMoteP.nc
tos/lib/tossim/TossimActiveMessageC.nc
tos/system/RealMainP.nc
tos/types/TinyError.h

index a959ceb57f3c23b81e68cde7748b9602a7d2cbd7..482a87fb5da9309c5d9f537655eefa29008fd7a0 100644 (file)
@@ -48,10 +48,10 @@ uint8_t atm128RegFile[TOSSIM_MAX_NODES][0xa0];
 
 /* We need slightly different defs than SIGNAL, INTERRUPT */
 #define AVR_ATOMIC_HANDLER(signame) \
-  void signame() __attribute__ ((spontaneous, C))
+  void signame() @spontaneous() @C()
 
 #define AVR_NONATOMIC_HANDLER(signame) \
-  void signame() __attribute__ ((spontaneous, C))
+  void signame() @spontaneous() @C()
 
 /* Macro to create union casting functions. */
 #define DEFINE_UNION_CAST(func_name, from_type, to_type) \
@@ -89,7 +89,7 @@ typedef uint8_t __nesc_atomic_t;
 
 /* Saves current interrupt mask state and disables interrupts. */
 inline __nesc_atomic_t 
-__nesc_atomic_start(void) __attribute__((spontaneous))
+__nesc_atomic_start(void) @spontaneous()
 {
     __nesc_atomic_t result = SREG;
     __nesc_disable_interrupt();
@@ -98,7 +98,7 @@ __nesc_atomic_start(void) __attribute__((spontaneous))
 
 /* Restores interrupt mask to original state. */
 inline void 
-__nesc_atomic_end(__nesc_atomic_t original_SREG) __attribute__((spontaneous))
+__nesc_atomic_end(__nesc_atomic_t original_SREG) @spontaneous()
 {
   SREG = original_SREG;
 }
index 8bd970fe72abdeb1b1c605889dbb93499a159627..a9c0df02765d845f1e94b8c004d608afdc0e12b0 100644 (file)
@@ -36,6 +36,8 @@
  * @author Jonathan Hui\r
  */\r
  \r
+#include <message.h>\r
\r
 interface LowPowerListening {\r
 \r
   /**\r
index f25590227755246597c673a51a4f47a6ab1d1491..1a5cc8b9f93158c7615369ede5ec6f6b1e31bd81 100644 (file)
@@ -146,11 +146,11 @@ MSP430REG_NORACE2(I2CDCTLnr,I2CDCTL);
 
 // The signal attribute has opposite meaning in msp430-gcc than in avr-gcc
 #define TOSH_SIGNAL(signame) \
-void sig_##signame() __attribute__((interrupt (signame), wakeup, C))
+  void sig_##signame() __attribute__((interrupt (signame), wakeup)) @C()
 
 // TOSH_INTERRUPT allows nested interrupts
 #define TOSH_INTERRUPT(signame) \
-void isr_##signame() __attribute__((interrupt (signame), signal, wakeup, C))
+  void isr_##signame() __attribute__((interrupt (signame), signal, wakeup)) @C()
 
 
 #define SET_FLAG(port, flag) ((port) |= (flag))
index 04d056ba47a0176b7df863958ef07d378e8ec397..1f377bf56038ab11a8b0d66ec340760f8fba67ad 100644 (file)
@@ -92,7 +92,7 @@ inline uint32_t _pxa27x_clzui(uint32_t i) {
 typedef uint32_t __nesc_atomic_t;
 
 //NOTE...at the moment, these functions will ONLY disable the IRQ...FIQ is left alone
-inline __nesc_atomic_t __nesc_atomic_start(void) __attribute__((spontaneous))
+inline __nesc_atomic_t __nesc_atomic_start(void) @spontaneous()
 {
   uint32_t result = 0;
   uint32_t temp = 0;
@@ -108,7 +108,7 @@ inline __nesc_atomic_t __nesc_atomic_start(void) __attribute__((spontaneous))
   return result;
 }
 
-inline void __nesc_atomic_end(__nesc_atomic_t oldState) __attribute__((spontaneous))
+inline void __nesc_atomic_end(__nesc_atomic_t oldState) @spontaneous()
 {
   uint32_t  statusReg = 0;
   //make sure that we only mess with the INT bit
index 8b4eba708f0080c0111486375f9f545e785e393c..2f9d242e8fec049a9292c416614ab386adea1705 100644 (file)
@@ -250,7 +250,7 @@ implementation {
 
   }
 
-  int main() __attribute__ ((C, spontaneous)) {
+  int main() @C() @spontaneous() {
 
     __nesc_disable_interrupt();
 
index 15a3e87d675b7fe1397454ab35f3c16f1c9959fb..0dde2a1e24a1538c4b7a2e993cb7f367ee2452f9 100644 (file)
@@ -133,10 +133,10 @@ static inline void TOSH_MAKE_##alias##_INPUT()  {TOSH_MAKE_##connector##_INPUT()
 
 // We need slightly different defs than SIGNAL, INTERRUPT
 #define TOSH_SIGNAL(signame)                                   \
-void signame() __attribute__ ((signal, spontaneous, C))
+  void signame() __attribute__ ((signal)) @spontaneous() @C()
 
 #define TOSH_INTERRUPT(signame)                                \
-void signame() __attribute__ ((interrupt, spontaneous, C))
+  void signame() __attribute__ ((interrupt)) @spontaneous() @C()
 
 /* Watchdog Prescaler
  */
@@ -166,14 +166,14 @@ void TOSH_wait()
 
 /* #ifndef NESC_BUILD_BINARY */
 
-/* inline __nesc_atomic_t __nesc_atomic_start(void) __attribute__((spontaneous)) */
+/* inline __nesc_atomic_t __nesc_atomic_start(void) @spontaneous() */
 /* { */
 /*   __nesc_atomic_t result = inp(SREG); */
 /*   cli(); */
 /*   return result; */
 /* } */
 
-/* inline void __nesc_atomic_end(__nesc_atomic_t oldSreg) __attribute__((spontaneous)) */
+/* inline void __nesc_atomic_end(__nesc_atomic_t oldSreg) @spontaneous() */
 /* { */
 /*   outp(oldSreg, SREG); */
 /* } */
index 66fad9928955bba46cda0ab035125b9c5444f368..aa54d3ff76ee2bff1e8b3589bb99c042791091a9 100644 (file)
@@ -40,7 +40,7 @@ module SimMainP {
 }
 implementation {
 
-  int sim_main_start_mote() __attribute__ ((C, spontaneous)) {
+  int sim_main_start_mote() @C() @spontaneous() {
     char timeBuf[128];
     atomic {
       /* First, initialize the Scheduler so components can post
index bea63dddfe692127cad5b5af2ee62981b2b36548..fc6071c3302cc88ed2f1004fdf0a2b646aec7923 100644 (file)
@@ -79,7 +79,7 @@ implementation {
   }
 
   
-  long long int sim_mote_euid(int mote) __attribute__ ((C, spontaneous)) {
+  long long int sim_mote_euid(int mote) @C() @spontaneous() {
     long long int result;
     int tmp = sim_node();
     sim_set_node(mote);
@@ -88,14 +88,14 @@ implementation {
     return result;
   }
 
-  void sim_mote_set_euid(int mote, long long int id)  __attribute__ ((C, spontaneous)) {
+  void sim_mote_set_euid(int mote, long long int id)  @C() @spontaneous() {
     int tmp = sim_node();
     sim_set_node(mote);
     call SimMote.setEuid(id);
     sim_set_node(tmp);
   }
   
-  long long int sim_mote_start_time(int mote) __attribute__ ((C, spontaneous)) {
+  long long int sim_mote_start_time(int mote) @C() @spontaneous() {
     long long int result;
     int tmp = sim_node();
     sim_set_node(mote);
@@ -104,7 +104,7 @@ implementation {
     return result;
   }
 
-  int sim_mote_get_variable_info(int mote, char* name, void** ptr, size_t* len) __attribute__ ((C, spontaneous)) {
+  int sim_mote_get_variable_info(int mote, char* name, void** ptr, size_t* len) @C() @spontaneous() {
     int result;
     int tmpID = sim_node();
     sim_set_node(mote);
@@ -114,7 +114,7 @@ implementation {
     return result;
   }
   
-  void sim_mote_set_start_time(int mote, long long int t) __attribute__ ((C, spontaneous)) {
+  void sim_mote_set_start_time(int mote, long long int t) @C() @spontaneous() {
     int tmpID = sim_node();
     sim_set_node(mote);
     startTime = t;
@@ -123,7 +123,7 @@ implementation {
     return;
   }
   
-  bool sim_mote_is_on(int mote) __attribute__ ((C, spontaneous)) {
+  bool sim_mote_is_on(int mote) @C() @spontaneous() {
     bool result;
     int tmp = sim_node();
     sim_set_node(mote);
@@ -132,14 +132,14 @@ implementation {
     return result;
   }
   
-  void sim_mote_turn_on(int mote) __attribute__ ((C, spontaneous)) {
+  void sim_mote_turn_on(int mote) @C() @spontaneous() {
     int tmp = sim_node();
     sim_set_node(mote);
     call SimMote.turnOn();
     sim_set_node(tmp);
   }
   
-  void sim_mote_turn_off(int mote) __attribute__ ((C, spontaneous)) {
+  void sim_mote_turn_off(int mote) @C() @spontaneous() {
     int tmp = sim_node();
     sim_set_node(mote);
     call SimMote.turnOff();
@@ -155,7 +155,7 @@ implementation {
     call SimMote.turnOn();
   }
   
-  void sim_mote_enqueue_boot_event(int mote) __attribute__ ((C, spontaneous)) {
+  void sim_mote_enqueue_boot_event(int mote) @C() @spontaneous() {
     int tmp = sim_node();
     sim_set_node(mote);
 
index 2c1786288b8640b4f55e4d483f62b0069d2dbc79..dd183fc2647e26881683423215ca59145da25c53 100644 (file)
@@ -243,7 +243,7 @@ implementation {
    return evt;
  }
  
- void active_message_deliver(int node, message_t* msg, sim_time_t t) __attribute__ ((C, spontaneous)) {
+ void active_message_deliver(int node, message_t* msg, sim_time_t t) @C() @spontaneous() {
    sim_event_t* evt = allocate_deliver_event(node, msg, t);
    sim_queue_insert(evt);
  }
index 22e77d31eb69efc3c76c4d3d47dfaf4fb70da6a9..ad969181e6d438af0cd9f1b589e9f698a19ad2c9 100644 (file)
@@ -49,7 +49,7 @@ module RealMainP {
   uses interface Init as SoftwareInit;
 }
 implementation {
-  int main() __attribute__ ((C, spontaneous)) {
+  int main() @C() @spontaneous() {
     atomic
       {
        /* First, initialize the Scheduler so components can post
index d733a4260477c1ba50048188b08356921b31cfc7..02249bc2db5ca56d6f537598becec9de4dbd50e5 100644 (file)
@@ -44,7 +44,7 @@ enum {
   EALREADY       = 9,           // The device state you are requesting is already set
 };
 
-typedef uint8_t error_t __attribute__((combine(ecombine)));
+typedef uint8_t error_t @combine("ecombine");
 
 error_t ecombine(error_t r1, error_t r2)
 /* Returns: r1 if r1 == r2, FAIL otherwise. This is the standard error