Commit Graph

25 Commits

Author SHA1 Message Date
Nekotekina
b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina
34fa010601 Improve cond_var notifiers
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Nekotekina
b1b67a13c6 Revert "Replace rotate utils with std::rotl" (partial)
This reverts commit 4d8bfe328b.
2020-04-14 19:45:53 +03:00
Nekotekina
feee3838eb Revert "Revert "Remove shared_cond and simplify reservation waiting""
This reverts commit b70c08a2e8.
2019-09-24 05:01:00 +03:00
Nekotekina
3121fecc8f cond_variable: fix warning in cond.h for MSVC 2019-09-21 03:59:43 +03:00
Nekotekina
b70c08a2e8 Revert "Remove shared_cond and simplify reservation waiting"
This reverts commit 0a96497e13.
2019-09-14 00:02:48 +03:00
Nekotekina
0a96497e13 Remove shared_cond and simplify reservation waiting
Use atomic wait for reservations
Cleanup some obsolete code
2019-09-10 19:25:39 +03:00
Nekotekina
d13ff285d1 Rewrite cond_variable to use waitable atomics
Increase max_timeout and fix max_timeout usage
2019-09-10 19:25:39 +03:00
Nekotekina
92a75cfa80 Remove unique_cond
Not very useful.
2019-09-10 19:25:39 +03:00
Nekotekina
a45f86a4a2 Remove notifier class
Poorly implemented condition variable.
2019-09-10 19:25:39 +03:00
Nekotekina
f63e89f9b4 Implement waitable atomics
Moved Atomic.h to util/atomic.hpp
List source files in CMakeLists.txt
2019-07-29 03:04:55 +03:00
msuih
503e023815 Explicitly downcast integers 2019-07-01 04:33:23 +03:00
Nekotekina
5d45a3e47d Implement cpu_thread::suspend_all
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
Nekotekina
9dc0368079 Rename cond_x16 to shared_cond
Extend capacity from 16 to 32.
Remove redundant m_total counter.
2019-06-04 16:37:50 +03:00
Nekotekina
31994dd3b2 Rename cond_one to unique_cond
Remove redundant in_cv in cellVdec
2019-06-02 23:22:16 +03:00
Nekotekina
96cabeadff Rewrite condition variables
Implement helper functions balanced_wait_until and balanced_awaken
They include new path for Windows 8.1+ (WaitOnAddress)

shared_mutex, cond_variable, cond_one, cond_x16 modified to use it
Added helper function utils::popcnt16
Replace most semaphore<> with shared_mutex
2018-11-29 01:30:05 +03:00
Nekotekina
febe4d4a10 Implement class cond_x16
Use as reservation notifier
Limited to 16 threads but allows more precise control of contention
2018-11-26 00:23:29 +03:00
Nekotekina
6104685ad6 Implement cond_one sync primitive
Change futex() args to use unsigned int
2018-11-05 13:14:11 +03:00
Nekotekina
bc87c5808c Add cond_variable::wait_unlock 2018-10-02 23:26:54 +03:00
Nekotekina
ee96807305 Remove explicit_bool_t, ignore, multicast<>
Remove vm::ptr operator %
This was a bad idea but explicit_bool_t was created almost for it
Other removed types are unused and have little to no meaning
2018-09-08 00:32:04 +03:00
Nekotekina
a33f297315 Replace notifier::lock_shared() with try_lock_shared()
Also add notify_one(), try_lock() and unlock()
Move some code in cond.cpp
2018-05-21 00:18:37 +03:00
Nekotekina
367f039523 Build transactions at runtime
Drop _xbegin family intrinsics due to bad codegen
Implemented `notifier` class, replacing vm::notify
Minor optimization: detach transactions from global mutex on TSX path
Minor optimization: don't acquire vm::passive_lock on PPU on TSX path
2018-05-16 17:31:58 +03:00
Nekotekina
c58738807e Fix cond_variable timeout
Thanks @Farseer2 for debugging
2017-11-18 10:24:17 +03:00
Nekotekina
a5a2d43d7c Thread.cpp refinement
Hide thread mutex
Safe notify() method
Other refactoring
2017-01-29 19:52:19 +03:00
Nekotekina
1c14d872a8 New shared_mutex
Experimental sync utils
New semaphore<>
New cond_variable
New owned_mutex
2017-01-25 00:38:07 +03:00