]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430UartP.nc
Remove redundant atomic blocks.
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430UartP.nc
index 1b595bfdbd9af40369beceb8128264f6f6620183..742c167470cd62d73fda661f01ead91cf509c93a 100644 (file)
@@ -236,25 +236,23 @@ implementation {
 
   async event void Interrupts.rx(uint8_t byte)
   {
-    atomic {
-      if (m_robuf) {
-       /* receive() takes precedence if active */
-       while (m_rlen && call Registers.getIfgRx()) {
-         *m_rbuf = byte;
-         if (--m_rlen)
-           m_rbuf++;
-       }
-       if (m_rlen == 0 && m_robuf) {
-         if (m_rxie) {
-           call Registers.clrIeRx();
-           call Registers.clrIfgRx();
-         }
-         m_robuf = 0;
-         signal UartStream.receiveDone(m_robuf, m_rolen, SUCCESS);
+    if (m_robuf) {
+      /* receive() takes precedence if active */
+      while (m_rlen && call Registers.getIfgRx()) {
+       *m_rbuf = byte;
+       if (--m_rlen)
+         m_rbuf++;
+      }
+      if (m_rlen == 0 && m_robuf) {
+       if (m_rxie) {
+         call Registers.clrIeRx();
+         call Registers.clrIfgRx();
        }
-      } else
-       signal UartStream.receivedByte(byte);
-    }
+       m_robuf = 0;
+       signal UartStream.receiveDone(m_robuf, m_rolen, SUCCESS);
+      }
+    } else
+      signal UartStream.receivedByte(byte);
   }
 
   default async command const msp430_usci_uart_t* Configure.get()