Lioncash
bf632d8e1e
kernel/vm_manager: Convert loop into std::any_of()
2018-08-02 12:46:15 -04:00
Lioncash
ec7319a5de
kernel/vm_manager: Use const where applicable
...
Makes our immutable state explicit.
2018-08-02 12:21:46 -04:00
Lioncash
26e2e7b657
kernel/vm_manager: Use the VAddr type alias in CarveVMA()
...
These two variables correspond to address ranges.
2018-08-02 12:15:50 -04:00
Lioncash
682836d539
kernel/thread: Remove unimplemented function prototype
...
Given there's no implementation, we may as well remove the code
entirely.
2018-07-31 23:21:38 -04:00
bunnei
b9d19ca36e
Merge pull request #877 from lioncash/remove
...
kernel: Remove unused object_address_table.cpp/.h
2018-07-31 20:11:39 -07:00
Lioncash
ea4e7b7fc5
kernel: Remove unused object_address_table.cpp/.h
...
These source files were entirely unused throughout the rest of the
codebase. This also has the benefit of getting rid of a global variable
as well.
2018-07-31 11:03:08 -04:00
Lioncash
3d2d454c36
kernel: Remove unnecessary includes
...
Removes unnecessary direct dependencies in some headers and also gets
rid of indirect dependencies that were being relied on to be included.
2018-07-31 10:15:17 -04:00
Lioncash
9f7550d027
kernel/timer: Make data members private where applicable
...
Instead, we can just expose functions that return the queryable state
instead of letting anything modify it.
2018-07-26 09:51:44 -04:00
Mat M
2113988e81
Merge pull request #804 from lioncash/log
...
svc: Log parameters in SetMemoryAttribute()
2018-07-25 14:43:24 -04:00
bunnei
d1035d4b76
Merge pull request #803 from MerryMage/core_timing_util
...
core_timing: Split off utility functions into core_timing_util
2018-07-25 11:09:31 -07:00
Lioncash
46a1bbceea
svc: Resolve sign comparison warnings in WaitSynchronization()
...
The loop's induction variable was signed, but we were comparing against
an unsigned variable.
2018-07-24 09:55:17 -04:00
Lioncash
5bd30caa5c
svc: Log parameters in SetMemoryAttribute()
...
Provides slightly more context than only logging out the address value.
2018-07-24 09:46:46 -04:00
bunnei
070b662525
Merge pull request #794 from lioncash/ref
...
mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference
2018-07-24 04:45:34 -07:00
MerryMage
672d7dd573
core_timing: Split off utility functions into core_timing_util
2018-07-24 11:03:24 +01:00
Lioncash
ecc4f5065a
mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference
...
The pointed to thread's members are simply observed in this case, so we
don't need to copy it here.
2018-07-23 22:54:35 -04:00
Lioncash
a15433c2a9
hle_ipc: Make constructors explicit where applicable
2018-07-23 22:40:24 -04:00
Lioncash
ec38b938da
hle: Remove config_mem.h/.cpp
...
This is just an unused hold-over from citra, so we can get rid of this
to trim off an exposed global, among other things.
2018-07-23 12:57:34 -04:00
Lioncash
aba0f5452d
hle: Remove shared_page.h/.cpp
...
This is a holdover from citra that's essentially unused.
2018-07-23 12:53:07 -04:00
Subv
e9639ffafa
Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel.
2018-07-22 12:27:24 -05:00
bunnei
6458900d74
Merge pull request #751 from Subv/tpidr_el0
...
CPU: Save and restore the TPIDR_EL0 system register on every context switch
2018-07-21 10:48:30 -07:00
Subv
196a689d20
CPU: Save and restore the TPIDR_EL0 system register on every context switch.
...
Note that there's currently a dynarmic bug preventing this register from being written.
2018-07-20 19:57:45 -05:00
Lioncash
059d0017f1
thread: Convert ThreadStatus into an enum class
...
Makes the thread status strongly typed, so implicit conversions can't
happen. It also makes it easier to catch mistakes at compile time.
2018-07-19 22:08:56 -04:00
bunnei
b55fa06eef
Merge pull request #726 from lioncash/overload
...
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
2018-07-19 16:18:38 -07:00
bunnei
e9c9207523
Merge pull request #721 from lioncash/svc
...
svc: Correct always true assertion case in SetThreadCoreMask
2018-07-19 16:11:40 -07:00
Lioncash
2b158ebd25
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
...
This introduces a slightly more generic variant of WriteBuffer().
Notably, this variant doesn't constrain the arguments to only accepting
std::vector instances. It accepts whatever adheres to the
ContiguousContainer concept in the C++ standard library.
This essentially means, std::array, std::string, and std::vector can be
used directly with this interface. The interface no longer forces you to
solely use containers that dynamically allocate.
To ensure our overloads play nice with one another, we only enable the
container-based WriteBuffer if the argument is not a pointer, otherwise
we fall back to the pointer-based one.
2018-07-19 17:05:12 -04:00
Lioncash
9ee475f731
svc: Correct always true assertion case in SetThreadCoreMask
...
The reason this would never be true is that ideal_processor is a u8 and
THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how
arithmetic conversions are performed before performing the comparison.
If an unsigned value has a lesser conversion rank (aka smaller size)
than the signed type being compared, then the unsigned value is promoted
to the signed value (i.e. u8 -> s32 happens before the comparison). No
sign-extension occurs here either.
An alternative phrasing:
Say we have a variable named core and it's given a value of -2.
u8 core = -2;
This becomes 254 due to the lack of sign. During integral promotion to
the signed type, this still remains as 254, and therefore the condition
will always be true, because no matter what value the u8 is given it
will never be -2 in terms of 32 bits.
Now, if one type was a s32 and one was a u32, this would be entirely
different, since they have the same bit width (and the signed type would
be converted to unsigned instead of the other way around) but would
still have its representation preserved in terms of bits, allowing the
comparison to be false in some cases, as opposed to being true all the
time.
---
We also get rid of two signed/unsigned comparison warnings while we're
at it.
2018-07-19 15:46:17 -04:00
Lioncash
a52cb33af2
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
...
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.
Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
2018-07-19 11:10:16 -04:00
bunnei
25c34badfa
Merge pull request #692 from lioncash/assign
...
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18 20:56:28 -07:00
bunnei
90042f35a5
Merge pull request #690 from lioncash/move
...
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18 20:55:55 -07:00
bunnei
6f120be510
Merge pull request #688 from lioncash/comma
...
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18 18:59:09 -07:00
Lioncash
76a9fc2f85
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
...
This was introduced within d12af72c8f
, and
considering there's no comment indicating that this is intentional, this
is very likely a bug.
2018-07-18 19:46:46 -04:00
Lioncash
81bf614695
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
...
Without these, this would perform concatenation, which is definitely not
what we want here.
2018-07-18 19:37:19 -04:00
Lioncash
b1b1c60009
core/memory, core/hle/kernel: Use std::move where applicable
...
Avoids pointless copies
2018-07-18 19:34:31 -04:00
Lioncash
e72928762f
core: Don't construct instance of Core::System, just to access its live instance
...
This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.
These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
2018-07-18 18:18:27 -04:00
bunnei
5dde645197
Merge pull request #671 from MerryMage/clear-exclusive-state
...
scheduler: Clear exclusive state when switching contexts
2018-07-17 07:33:32 -07:00
bunnei
430c52b249
Merge pull request #672 from SciresM/to_address_fix
...
svc:: Fix bug in svcWaitForAddress
2018-07-17 07:32:42 -07:00
bunnei
df66fadc12
nvflinger: Fix for BufferQueue event handling.
2018-07-17 00:26:23 -04:00
Michael Scire
045893374f
Kernel/Arbiter: Fix bug in WaitIfLessThan
2018-07-16 20:55:53 -06:00
MerryMage
bd97579188
scheduler: Clear exclusive state when switching contexts
2018-07-16 11:24:00 +01:00
David Marcec
66bd4de380
No need to use ASSERT_MSG with an empty message
2018-07-14 23:13:16 +10:00
James Rowe
d74d2a77cb
Update clang format
2018-07-02 21:45:47 -04:00
James Rowe
e159c550d8
Rename logging macro back to LOG_*
2018-07-02 21:45:47 -04:00
bunnei
55d7d4afa4
Merge pull request #579 from SciresM/master
...
svc: Fully implement svcSignalToAddress and svcWaitForAddress
2018-06-22 12:08:39 -04:00
mailwl
29f156eb60
IPC: skip empty buffer write
...
prevent yuzu crash, if games, like Axiom Verge, trying to read 0 bytes from file
2018-06-22 11:28:10 +03:00
Michael Scire
a3509a9e74
Kernel/Arbiters: Fix casts, cleanup comments/magic numbers
2018-06-22 00:47:59 -06:00
Michael Scire
28fe461cd3
Add additional missing format.
2018-06-21 21:09:51 -06:00
Michael Scire
96617f16ed
Run clang-format on PR.
2018-06-21 21:05:34 -06:00
Michael Scire
9d83964c1b
Kernel/Arbiters: HLE is atomic, adjust code to reflect that.
2018-06-21 20:25:57 -06:00
Michael Scire
2a0ea82fec
Kernel/Arbiters: Initialize arb_wait_address in thread struct.
2018-06-21 05:13:06 -06:00
Michael Scire
3aa03cca5a
Kernel/Arbiters: Clear WaitAddress in SignalToAddress
2018-06-21 04:20:39 -06:00