The grand plan is: - Make Lock use atomic increments on the fast path and ParkingLot on the slow path. This will make the fast path a lot better and will reduce the memory usage of Lock. - Give Lock and ByteLock the ability to act as their own condition variables. - Create a separate Condition that uses one byte and some ParkingLot magic, for those cases where a separate condition variable is needed. Then we can remove all uses of std::mutex, std::condition_variable, WTF::Mutex, and WTF::ThreadCondition.
Created attachment 258884 [details] ParkingLot-based Condition
Created attachment 258912 [details] the patch This patch is good to go assuming we want to land this separately from the patch that replaces all uses of ThreadCondition/std::condition_variable with this.
Attachment 258912 [details] did not pass style-queue: ERROR: Source/WTF/wtf/ParkingLot.cpp:561: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:68: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:83: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:91: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:115: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:122: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 6 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 258912 [details] the patch Missing the ChangeLog.
Comment on attachment 258912 [details] the patch I will submit this patch to a different bug.
OK, I think this is done.