1
0
Fork 0
forked from suyu/suyu
Commit graph

1053 commits

Author SHA1 Message Date
comex
d37f0b29e2 Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
2020-08-05 20:34:49 -07:00
bunnei
d888ac7d20
Merge pull request #4477 from lioncash/log-desig
logging/backend: Make use of designated initializers
2020-08-05 22:34:12 -04:00
bunnei
4a2d9c6454
Merge pull request #4444 from lioncash/volatile
common/atomic_ops: Don't cast away volatile from pointers
2020-08-05 14:22:36 -04:00
Lioncash
8725b37a35 logging/backend: Make use of designated initializers
Same behavior, less code.
2020-08-03 10:37:48 -04:00
David
9b75481755
ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer

With the support of C++20, we can use concepts to deduce if a type is an STL container or not.

* More agressive concept for stl containers

* Add -fconcepts

* Move to common namespace

* Add Common::IsBaseOf
2020-08-03 07:28:54 -04:00
David
6c7292de33
Merge pull request #4263 from lat9nq/fix-screencaps-2
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
2020-08-03 21:00:14 +10:00
Lioncash
e3f0c93230 common/atomic_ops: Don't cast away volatile from pointers
Preserves the volatility of the pointers being casted.
2020-07-28 04:36:53 -04:00
bunnei
45cf48bd0a
Merge pull request #4415 from lioncash/maybe
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
2020-07-25 21:35:09 -07:00
LC
e3503de588
common/string_util: Remove unimplemented function prototype (#4414)
This function was relocated to log.h as a constexpr function, so this
can be removed.
2020-07-25 15:37:51 +02:00
Lioncash
ca6ff01333 virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
This isn't used on Windows, but is used on non-Windows operating
systems.
2020-07-25 03:04:27 -04:00
lat9nq
3848155c42 common: Add a screenshots directory
Adds a screenshots directory as a path managed by FileUtil.
2020-07-20 22:51:02 -04:00
Jan Beich
db43b37e15 alignment: explicitly include <new> after 723edb4c06
In file included from src/core/hle/kernel/memory/page_table.cpp:5:
src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std'
        return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align}));
                                                              ~~~~~^
src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std'
        ::operator delete (p, n * sizeof(T), std::align_val_t{Align});
                                             ~~~~~^
2020-07-18 23:06:16 +00:00
Lioncash
723edb4c06 alignment: Simplify AlignmentAllocator implementation
With C++20, much of the allocator interface has been simplified, so we
can make the same adjustments.
2020-07-17 08:30:12 -04:00
Lioncash
9f027b1af2 common/swap: Make use of std::endian
Allows removing a bunch of defines in favor of a two liner.
2020-07-14 16:26:54 -04:00
Tobias
80a0f2a118
common/alignment: Fix compilation errors (#4303) 2020-07-12 16:45:49 +02:00
bunnei
1074c87f18
Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp"" 2020-07-11 19:28:09 -04:00
Marshall Mohror
a4306b9e56 Common: remove a mod from AlignUp (#5441)
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
2020-07-11 18:39:00 +02:00
David Marcec
bd2feb6873 cmake: Fix libfmt linking errors 2020-07-10 14:04:06 +10:00
John Galt
95cd2e17ab cmake: fix fmt linking when found
This is a new attempt at #4206 that shouldn't break windows builds.

If someone else could test on windows, it would be much appreciated.
Previously, the build bot passed but the actual builds failed.
2020-07-09 11:35:28 -04:00
bunnei
98fcd3ba5d
Revert "cmake: fix fmt linking" 2020-07-02 22:53:12 -04:00
bunnei
064b7bfa5f
Merge pull request #4206 from RealJohnGalt/linkfix
cmake: fix fmt linking
2020-07-02 22:23:39 -04:00
Jan Beich
3b1683a152 common: switch to nullptr for sysctl's empty new value 2020-06-30 23:00:18 +00:00
Jan Beich
e6085ea35f common: add sysconf() fallback
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
2020-06-29 22:41:22 +00:00
John Galt
765e37aa35 cmake: fix fmt linking
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking
fails. This fixes the issue.

Note: This was included in the FindBoost changes I shared with
BlinkHawk, however only they were merged. I'm not sure if it was missed,
or if there was an issue with this part of the change.
2020-06-29 07:10:07 -04:00
Fernando Sahmkow
2f8947583f Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow
7fd7d05838 Common/Kernel: Corrections and small bug fixing. 2020-06-27 11:36:21 -04:00
Fernando Sahmkow
3165152396 Common/NativeClockx86: Reduce native clock accuracy further. 2020-06-27 11:36:18 -04:00
Fernando Sahmkow
7b1804dab4 Common/AtomicOps: Correct GCC Intrinsic argument ordering. 2020-06-27 11:36:16 -04:00
Fernando Sahmkow
467d43570e Clang Format. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow
528b19a842 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow
534466754f X64 Clock: Reduce accuracy to be less or equal to guest accuracy. 2020-06-27 11:35:55 -04:00
Fernando Sahmkow
cd1c38be8d ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes. 2020-06-27 11:35:37 -04:00
Fernando Sahmkow
18dcb09342 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow
e31425df38 General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
David
0ea4a8bcc4
Merge pull request #3396 from FernandoS27/prometheus-1
Implement SpinLocks, Fibers and a Host Timer
2020-06-28 01:34:07 +10:00
Fernando Sahmkow
7b893c7963 Common: Fix non-conan build 2020-06-26 12:25:19 -04:00
Morph
97ba520434 common/telemetry: Add AVX512 to telemetry 2020-06-20 00:31:37 -04:00
Morph
d6474b4aca common/cpu_detect: Add AVX512 detection 2020-06-20 00:31:37 -04:00
Fernando Sahmkow
e77ee67bfa Common/Fiber: Address Feedback and Correct Memory leaks. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow
b6655aa2e4 Common/Fiber: Implement Rewind on Boost Context. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow
59ce6e6d06 Common/uint128: Correct MSVC Compilation in old versions. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow
18f54f7486 Common/Fiber: Document fiber interexchange. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow
137d862d9b Common/Fiber: Implement Rewinding. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow
41013381d6 Common/Fiber: Additional corrections to f_context. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow
7d2b1a6ec4 Common/Fiber: Correct f_context based Fibers. 2020-06-18 16:29:24 -04:00
Fernando Sahmkow
49a7e0984a Core/HostTiming: Allow events to be advanced manually. 2020-06-18 16:29:22 -04:00
Fernando Sahmkow
1f7dd36499 Common/Tests: Address Feedback 2020-06-18 16:29:21 -04:00
Fernando Sahmkow
3398f701ee Common: Make MinGW build use Windows Fibers instead of fcontext_t 2020-06-18 16:29:20 -04:00
Fernando Sahmkow
1bd706344e Common/Tests: Clang Format. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow
03e4f5dac4 Common: Correct fcontext fibers. 2020-06-18 16:29:19 -04:00