aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
AgeCommit message (Collapse)Author
2018-08-06kernel/event: Make data members privateLioncash
Instead we can simply provide accessors to the required data instead of giving external read/write access to the variables directly.
2018-08-05address_arbiter: Return by value from GetThreadsWaitingOnAddress()Lioncash
In all cases the vector being supplied is empty, so we can just return by value in these instances.
2018-08-04Merge pull request #914 from lioncash/codesetbunnei
kernel/process: Use accessors instead of class members for referencing segment array
2018-08-03kernel/thread: Fix potential crashes introduced in ↵Lioncash
26de4bb521b1ace7af76eff4f6956cb23ac0d58c This amends cases where crashes can occur that were missed due to the odd way the previous code was set up (using 3DS memory regions that don't exist).
2018-08-03kernel/process: Use std::array where applicableLioncash
2018-08-03kernel/process: Use accessors instead of class members for referencing ↵Lioncash
segment array Using member variables for referencing the segments array increases the size of the class in memory for little benefit. The same behavior can be achieved through the use of accessors that just return the relevant segment.
2018-08-03core/memory: Get rid of 3DS leftoversLioncash
Removes leftover code from citra that isn't needed.
2018-08-03Merge pull request #894 from lioncash/objectbunnei
kernel: Move object class to its own source files
2018-08-03Merge pull request #904 from lioncash/staticbunnei
kernel/thread: Minor changes
2018-08-02kernel/vm_manager: Convert loop into std::any_of()Lioncash
2018-08-02kernel/vm_manager: Use const where applicableLioncash
Makes our immutable state explicit.
2018-08-02kernel/vm_manager: Use the VAddr type alias in CarveVMA()Lioncash
These two variables correspond to address ranges.
2018-08-02kernel/thread: Make GetFreeThreadLocalSlot()'s loop indices size_tLioncash
Avoids using a u32 to compare against a range of size_t, which can be a source of warnings. While we're at it, compress a std::tie into a structured binding.
2018-08-02kernel/thread: Make GetFreeThreadLocalSlot() reference parameter a const ↵Lioncash
reference This function only reads the data being referenced, it doesn't modify it, so we can turn the reference into a const reference.
2018-08-02kernel/thread: Make GetFreeThreadLocalSlot() internally linkedLioncash
This function isn't used outside of this translation unit, so we can make it internally linked.
2018-08-01kernel: Move object class to its own source filesLioncash
General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
2018-07-31kernel/thread: Remove unimplemented function prototypeLioncash
Given there's no implementation, we may as well remove the code entirely.
2018-07-31Merge pull request #877 from lioncash/removebunnei
kernel: Remove unused object_address_table.cpp/.h
2018-07-31kernel: Remove unused object_address_table.cpp/.hLioncash
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-31kernel: Remove unnecessary includesLioncash
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
2018-07-26kernel/timer: Make data members private where applicableLioncash
Instead, we can just expose functions that return the queryable state instead of letting anything modify it.
2018-07-25Merge pull request #804 from lioncash/logMat M
svc: Log parameters in SetMemoryAttribute()
2018-07-25Merge pull request #803 from MerryMage/core_timing_utilbunnei
core_timing: Split off utility functions into core_timing_util
2018-07-24svc: Resolve sign comparison warnings in WaitSynchronization()Lioncash
The loop's induction variable was signed, but we were comparing against an unsigned variable.
2018-07-24svc: Log parameters in SetMemoryAttribute()Lioncash
Provides slightly more context than only logging out the address value.
2018-07-24Merge pull request #794 from lioncash/refbunnei
mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference
2018-07-24core_timing: Split off utility functions into core_timing_utilMerryMage
2018-07-23mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by referenceLioncash
The pointed to thread's members are simply observed in this case, so we don't need to copy it here.
2018-07-23hle_ipc: Make constructors explicit where applicableLioncash
2018-07-23hle: Remove config_mem.h/.cppLioncash
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-23hle: Remove shared_page.h/.cppLioncash
This is a holdover from citra that's essentially unused.
2018-07-22Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real ↵Subv
kernel.
2018-07-21Merge pull request #751 from Subv/tpidr_el0bunnei
CPU: Save and restore the TPIDR_EL0 system register on every context switch
2018-07-20CPU: Save and restore the TPIDR_EL0 system register on every context switch.Subv
Note that there's currently a dynarmic bug preventing this register from being written.
2018-07-19thread: Convert ThreadStatus into an enum classLioncash
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-19Merge pull request #726 from lioncash/overloadbunnei
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
2018-07-19Merge pull request #721 from lioncash/svcbunnei
svc: Correct always true assertion case in SetThreadCoreMask
2018-07-19hle_ipc: Introduce generic WriteBuffer overload for multiple container typesLioncash
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-19svc: Correct always true assertion case in SetThreadCoreMaskLioncash
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-19hle_ipc: Amend usage of buffer_index within one of HLERequestContext's ↵Lioncash
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-18Merge pull request #692 from lioncash/assignbunnei
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18Merge pull request #690 from lioncash/movebunnei
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18Merge pull request #688 from lioncash/commabunnei
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18address_arbiter: Correct assignment within an assertion statement in ↵Lioncash
WakeThreads() This was introduced within 4f81bc4e1bd12e4df7410c6790ba818d8dbba9c0, and considering there's no comment indicating that this is intentional, this is very likely a bug.
2018-07-18vm_manager: Add missing commas to string literal array elements in ↵Lioncash
GetMemoryStateName() Without these, this would perform concatenation, which is definitely not what we want here.
2018-07-18core/memory, core/hle/kernel: Use std::move where applicableLioncash
Avoids pointless copies
2018-07-18core: Don't construct instance of Core::System, just to access its live instanceLioncash
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-17Merge pull request #671 from MerryMage/clear-exclusive-statebunnei
scheduler: Clear exclusive state when switching contexts
2018-07-17Merge pull request #672 from SciresM/to_address_fixbunnei
svc:: Fix bug in svcWaitForAddress
2018-07-17nvflinger: Fix for BufferQueue event handling.bunnei