Changes between Version 100 and Version 101 of Developer/Coding/Conventions


Ignore:
Timestamp:
Nov 22, 2018, 4:19:19 PM (4 months ago)
Author:
Abhimanyu Raghuvanshi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Coding/Conventions

    v100 v101  
    1818
    1919 *  The RTEMS [wiki:TBR/Website/License License] is the typical and preferred license.
    20   *  2- and 3-clause BSD, MIT, and other OSI-approved non-copyleft licenses that permit statically linking with code of different licenses are acceptable.
     20  *  2- and 3-clause BSD, MIT, and other OSI-approved non-copyleft licenses that permit statically linking with the code of different licenses are acceptable.
    2121  *  GPL licensed code is NOT acceptable, neither is LGPL. See [http://gedare-csphd.blogspot.com/2013/05/software-licenses-with-rtems.html this blog post explanation] for more information.
    2222  *  Advertising obligations are NOT acceptable, but restrictions are permissible.
     
    7777 *  Define non-inline functions in a .c source file.
    7878 *  Declare all global (non-static) functions in a .h header file.
    79  *  Declare and define inline functions in one place. Usually this is a *impl.h header file.
    80  *  Declare and define static functions in one place. Usually this is toward the start of a .c file. Minimize forward declarations of static functions.
     79 *  Declare and define inline functions in one place. Usually, this is a *impl.h header file.
     80 *  Declare and define static functions in one place. Usually, this is toward the start of a .c file. Minimize forward declarations of static functions.
    8181 *  Function declarations should include variable names.
    8282 *  Avoid excess parentheses. Learn the [http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence operator precedence] rules.
     
    109109= Maintainability =
    110110
    111  *  Minimize modifications to [wiki:Developer/Coding/ThirdPartyCode third party code].
     111 *  Minimize modifications to [wiki:Developer/Coding/ThirdPartyCode third-party code].
    112112 *  Keep it simple! Simple code is easier to debug and easier to read than clever code.
    113113 *  Share code with other architectures, CPUs, and BSPs where possible.
     
    116116
    117117 *  Prefer algorithms with the [wiki:FAQ/AlgorithmicComplexity lowest order of time and space] for fast, deterministic execution times with small memory footprints.
    118  *  Understand the contraints of [wiki:TBR/Review/Real-Time_Resources real-time programming]. Limit execution times in interrupt contexts and critical sections, such as Interrupt and Timer Service Routines (TSRs).
     118 *  Understand the constraints of [wiki:TBR/Review/Real-Time_Resources real-time programming]. Limit execution times in interrupt contexts and critical sections, such as Interrupt and Timer Service Routines (TSRs).
    119119 *  Functions used only through function pointers should be declared 'static inline' (RTEMS_INLINE_ROUTINE)
    120120 *  Prefer to ++preincrement instead of postincrement++.