Compare commits

..

6 commits

Author SHA1 Message Date
04c9f52997 Tweak compare_exchange_weak(...) in spin-lock 2024-01-11 20:18:10 +09:00
c72a337f77 Fix invalid use of mutex in TSLQueue
Mutex was removed in favor of the custom SharedSpinLock.
2024-01-11 20:18:10 +09:00
beb08b74d5 Don't fail on "try" fns if failed to get spinLock
In SharedSpinLock: Only fail on "try" fns after spinLock was acquired
and condition is not met.
2024-01-11 20:18:10 +09:00
e87cedf38b Refactor shared-spin-lock to use atomic "spinLock" 2024-01-11 20:18:10 +09:00
f0ac3449d8 Minor refactorings 2024-01-11 20:18:10 +09:00
bb14643d2a Reland C++11 "shared_lock" with iter remove fix
On iterator remove, the iterator will trade the read lock for a write
lock, and trade back for a read lock once the remove has been completed.
2024-01-11 20:18:10 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ set(UDPC_SOURCES
add_compile_options( add_compile_options(
-Wall -Wextra -Wpedantic -Wno-missing-braces -Wall -Wextra -Wpedantic -Wno-missing-braces
$<$<COMPILE_LANGUAGE:CXX>:-Weffc++> $<$<COMPILE_LANGUAGE:CXX>:-Weffc++>
$<$<CONFIG:DEBUG>:-Og> $<$<CONFIG:DEBUG>:-O0>
) )
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2019-2024 Stephen Seo Copyright (c) 2019-2023 Stephen Seo
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal