Changes between Version 48 and Version 49 of Developer/Coding/Conventions


Ignore:
Timestamp:
May 30, 2014, 6:01:27 PM (5 years ago)
Author:
Gedare
Comment:

/* Portability */ New section

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Coding/Conventions

    v48 v49  
    2525 *  Do not use compiler extensions.
    2626 *  Pay attention to warnings. Strive to eliminate them.
     27 *  Use RTEMS_ZERO_LENGTH_ARRAY when defining [https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html variable-length objects].
    2728= Formatting =
    2829
     
    6869 *  Avoid inline functions and macros with complicated logic and decision points.
    6970 *  CPP macros should use a leading underscore for parameter names and [https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html#Macro-Pitfalls avoid macro pitfalls].
     71= Portability =
     72
     73 *  Think portable! RTEMS supports a lot of target hardware.
     74 *  For integer primitives, prefer to use precise-width integer types from stdint.h.
     75 *  Write code that is 16-bit, 32-bit, and 64-bit friendly.
    7076= Miscellaneous =
    7177
    72  *  Think portable! RTEMS supports a lot of target hardware.
    7378 *  Use algorithms with the lowest order of execution. By favoring O(constant) over O(n) algorithms, RTEMS works hard to ensure deterministic execution times as much as possible.
    7479 *  If you need to temporarily change the execution mode of a task/thread, restore it.