• src/xpdev/threadwrap.c threadwrap.h

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Jun 16 19:06:06 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4879ec1ba7d08508e0cdbe74
    Modified Files:
    src/xpdev/threadwrap.c threadwrap.h
    Log Message:
    Resolve discrepency between std-atomic and mutex-based protected_int*_adjust()

    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Jun 16 19:35:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/aba43ad915ffdc3e229c6647
    Modified Files:
    src/xpdev/threadwrap.c threadwrap.h
    Log Message:
    Fix typos and missing prototypes necessary for Win32 build

    Reviewing this header file, it even included this now misleading comment:
    /* Return new value: */
    .. protected_int32_adjust(...)

    <shrug> Fixed that too.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net