Hi:

I am confued by the following keyword "atomic":


message_t* receive(message_t *msg, void *payload, uint8_t len) {
    message_t *ret = msg;

    atomic {
      if (!uartFull)
    {
      ret = uartQueue[uartIn];
      uartQueue[uartIn] = msg;
...
   }
...
}

I think the context of these codes excute is "task specific ", no interrupt
occurs. so there is no need to use the keyword "atomic". any on  give me a
shorter explanation? thanks!


Best regards!

[email protected]
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to