Philip Levis wrote:
On Jul 5, 2006, at 11:24 AM, Adam wrote:

I notice GenericComm has this following function:

TOS_MsgPtr handleReceived(TOS_MsgPtr packet)  __attribute__ ((C,
spontaneous))

I am curious that what's the difference if we use __attribute__ ((C,
spontaneous)) or not to define an global function? I have written several global function without using the _attribute, it seems working fine so far.


Dead code elimination. Spontaneous tells nesC that the function might be called from "elsewhere" and therefore shouldn't be removed.

Phil

Out of curiosity, would nesC also not perform any optimisation on this bit of code as well, or is that left up to avr-gcc?

cheers,
Tehn Yit Chin
Embedded System Engineer, Grey Innovation Pty. Ltd.

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

Reply via email to