Again, if these functions will be called inside nesC code only, is it not necessary ? -- I just wan to confirm it is not related to byte order or parameter order issues -- like between C and Fortran.
-----Original Message----- From: Adam [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 11:53 AM To: 'Philip Levis' Cc: 'tinyos-help' Subject: RE: [Tinyos-help] __attribute__ ((C, spontaneous)) Thanks. Does this mean it is recommended to add this attibute to all global C functions? For my case, I write some buffer manage functions -- multiple modules can call those functions -- I added "atomic" in each of those functions, will it be removed by compiler (since atomic is not a c KEYWORD) if I use these attributes? I ASSUME NOT. Please correct me if I am wrong. Thanks. -----Original Message----- From: Philip Levis [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 11:37 AM To: Adam Cc: 'tinyos-help' Subject: Re: [Tinyos-help] __attribute__ ((C, spontaneous)) 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 _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
