Copyright © 2004, Aonix
31
Why is hard real-time C development hard?
•There are no “standard” libraries for real-time services (e.g. multi-threading, synchronization, interrupt handling, device I/O)
–Time and effort is required to figure out the services of each RTOS (documentation is often lacking so this usually requires trial and error)
•Imprecise ANSI definition of “volatile”.  Time and effort is required to figure out each compiler.
–Will instructions be reordered?  When will store operations propagate to other processors? Documentation may be poor.  Testing inconclusive: is behavior by design or coincidence?
•Poor abstraction and encapsulation fail to isolate concerns between teams of developers
–No private variables, limited name spaces, lack of object orientation limits code reuse
•Lesser evils: unknown type sizes, pointer manipulation and memory corruption, C++ compiler differences
•
•