-
- Downloads
Use protected_int*_adjust[_fetch]() correctly
At least on Linux/GCC, std-atomic version of xpdev/protected_int API was only used when building .cpp files and the _adjust() functions returned a different value from the .c files since they used the mutex versions of these functions/ macros. Use the _adjust_fetch() versions of the API when the return value is used (and assumed to be the *new* / adjusted value of the integer). It's possible for other tool-chains or target platforms, the .c usage was wrong as well (assuming the *new* integer value was returned rather than the old), if they built with std-atomic support for C.
Showing
- src/sbbs3/ftpsrvr.c 1 addition, 1 deletionsrc/sbbs3/ftpsrvr.c
- src/sbbs3/mailsrvr.c 2 additions, 2 deletionssrc/sbbs3/mailsrvr.c
- src/sbbs3/main.cpp 1 addition, 1 deletionsrc/sbbs3/main.cpp
- src/sbbs3/services.c 2 additions, 2 deletionssrc/sbbs3/services.c
- src/sbbs3/websrvr.c 2 additions, 2 deletionssrc/sbbs3/websrvr.c
Loading
Please register or sign in to comment