Skip to content
  • Rob Swindell's avatar
    4879ec1b
    Resolve discrepency between std-atomic and mutex-based protected_int*_adjust() · 4879ec1b
    Rob Swindell authored
    Since commit 692c8128 (4 years ago), the std-atomic and mutex-based
    based implementations of protected_int*_adjust() have different in a critical
    detail:
    The std-atomic verisons return the old/original integer value while the
    mutex versions (used in most or all .c files) return the new/adjusted integer
    value.
    
    Standardize on the std-atomic pattern: if you want the new/adjusted integer
    value, use the protected_int*_adjust_fetch() version of these functions.
    4879ec1b
    Resolve discrepency between std-atomic and mutex-based protected_int*_adjust()
    Rob Swindell authored
    Since commit 692c8128 (4 years ago), the std-atomic and mutex-based
    based implementations of protected_int*_adjust() have different in a critical
    detail:
    The std-atomic verisons return the old/original integer value while the
    mutex versions (used in most or all .c files) return the new/adjusted integer
    value.
    
    Standardize on the std-atomic pattern: if you want the new/adjusted integer
    value, use the protected_int*_adjust_fetch() version of these functions.
Loading