Commit Graph

20 Commits

Author SHA1 Message Date
Nekotekina
db7042b986 Restore using keyed events in waitable atomics on Windows 2019-10-18 23:08:00 +03:00
Nekotekina
9710473a2e atomic.hpp: use native semaphores on Windows
Windows: drop keyed events
Linux: keep using native futex
Implement unused POSIX semaphore path
Implement fallback semaphore with pure std (OSX, BSD, etc)
2019-09-24 05:01:00 +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
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
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
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
4f152ad126 SPU: multithread compilation
Allow parallel compilation of SPU code, both at startup and runtime
Remove 'SPU Shared Runtime' option (it became obsolete)
Refactor spu_runtime class (now is common for ASMJIT and LLVM)
Implement SPU ubertrampoline generation in raw assembly (LLVM)
Minor improvement of balanced_wait_until<> and balanced_awaken<>
Make JIT MemoryManager2 shared (global)
Fix wrong assertion in cond_variable
2019-01-22 22:02:02 +03:00
Nekotekina
81c50bad69 lf_queue: implement wait() method
Synchronization does not occupy additional space by reusing LSB
2019-01-13 14:45:36 +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
6104685ad6 Implement cond_one sync primitive
Change futex() args to use unsigned int
2018-11-05 13:14:11 +03:00
Nekotekina
f588454d26 Internal: register WaitOnAddress family functions (WinAPI) 2018-10-19 22:22:35 +03:00
Nekotekina
ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Jan Beich
cd6bf37d06 Utilities: explicitly add more includes found by GCC
Utilities/Log.cpp: In member function 'void logs::file_writer::log(logs::level, const char*, std::size_t)':
Utilities/Log.cpp:559:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(pos, text, frag);
         ^~~~~~
Utilities/Log.cpp:559:9: note: suggested alternative: 'empty'
    std::memcpy(pos, text, frag);
         ^~~~~~
         empty
Utilities/Log.cpp:560:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(m_fptr, text + frag, size - frag);
         ^~~~~~
Utilities/Log.cpp:560:9: note: suggested alternative: 'empty'
    std::memcpy(m_fptr, text + frag, size - frag);
         ^~~~~~
         empty
Utilities/Log.cpp:564:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(pos, text, size);
         ^~~~~~
Utilities/Log.cpp:564:9: note: suggested alternative: 'empty'
    std::memcpy(pos, text, size);
         ^~~~~~
         empty
Utilities/sync.h: In member function 'int futex(int*, int, int, const timespec*, int*, int)::futex_map::operator()(int*, int, int, const timespec*, int*, uint)':
Utilities/sync.h:110:20: error: 'find' is not a member of 'std'
     map.erase(std::find(map.find(uaddr), map.end(), ref));
                    ^~~~
Utilities/sync.h:110:20: note: suggested alternative: 'rend'
     map.erase(std::find(map.find(uaddr), map.end(), ref));
                    ^~~~
                    rend
2018-08-31 03:19:17 +04:00
Nekotekina
08cd8e0cb1 Cleanup: unused imports 2018-05-17 18:33:44 +03:00
pauls-gh
fdef77d779 Set Windows timer resolution to 0,5ms (#4579)
* Fix for https://github.com/RPCS3/rpcs3/issues/4569
(Win 10 update 1803 performance regression)
2018-05-17 15:00:22 +04:00
Nekotekina
98fc131d47 util::dynamic_import
Futex implementation
2017-01-25 00:38:07 +03:00
Nekotekina
0f87c4485d Silly macro removed-2 2016-08-14 18:19:42 +03:00
Ivan
edc92843a7 Hotfix (#1705) 2016-05-24 01:59:39 +03:00
Nekotekina
266db1336d The rest 2016-05-23 16:22:25 +03:00