??? 01/09/07 03:14 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#130469 - Embedded Specific Responding to: ???'s previous message |
ANSI C does not recognize the fact the Interupts can change variables mid stream. "Volitile" is covers this ( and Hardware registers). Atomic is Very Hardware specific.
Unused variables covers all uses. You have a list of ways to tell the compiler when not to use auto-atomic. That will scare away compiler makers that have to support it. In the end it will do the same thing you would. Automatic is not always good try fighting VB or MFC to make it do what you want, not what Microsoft thought was better. In the end I am sure it can be done. will it save time and make better code, who knows. It could just as easily go the other way and be a worse headache. With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. From RFC1925, R Callon, 1996. |