aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
AgeCommit message (Collapse)Author
2018-08-15Merge pull request #1051 from B3n30/UnscheduleEventThreadsafebunnei
Core::CoreTiming: add UnscheduleEventThreadsafe
2018-08-15kernel/server_session: Add IsSession() member functionLioncash
Allows querying the inverse of IsDomain() to make things more readable. This will likely also be usable in the event of implementing ConvertDomainToSession().
2018-08-14kernel/svc: Log svcBreak parametersLioncash
Given if we hit here all is lost, we should probably be logging the break reason code and associated information to distinguish between the causes.
2018-08-13Core::CoreTiming: add UnscheduleEventThreadsafeB3n30
2018-08-13kernel/object: Tighten object against data racesLioncash
Despite being covered by a global mutex, we should still ensure that the class handles its reference counts properly. This avoids potential shenanigans when it comes to data races. Given this is the root object that drives quite a bit of the kernel object hierarchy, ensuring we always have the correct behavior (and no races) is a good thing.
2018-08-12Merge pull request #1043 from Subv/timingbunnei
Use an approximated amortized amount of ticks when advancing timing.
2018-08-12Merge pull request #1036 from lioncash/threadbunnei
scheduler: Make HaveReadyThreads() a const member function
2018-08-12Merge pull request #1042 from Subv/racesbunnei
Fixed a bunch of race conditions when running in multicore mode.
2018-08-12Kernel/SVC: Don't reschedule the current core when creating a new thread.Subv
The current core may have nothing to do with the core where the new thread was scheduled to run. In case it's the same core, then the following PrepareReshedule call will take care of that.
2018-08-12Kernel/Threads: Lock the HLE mutex when executing the wakeup callback.Subv
Another thread might be in the middle of a reschedule, thus altering the state of the schedulers.
2018-08-12Kernel/Thread: Always use the threadsafe option when scheduling wakeups.Subv
WakeAfterDelay might be called from any host thread, so err on the side of caution and use the thread-safe CoreTiming::ScheduleEventThreadsafe. Note that CoreTiming is still far from thread-safe, there may be more things we have to work on for it to be up to par with what we want.
2018-08-12Kernel/Mutex: Don't duplicate threads in the mutex waiter list.Subv
Exit from AddMutexWaiter early if the thread is already waiting for a mutex owned by the owner thread. This accounts for the possibility of a thread that is waiting on a condition variable being awakened twice in a row. Also added more validation asserts. This should fix one of the random crashes in Breath Of The Wild.
2018-08-12scheduler: Make HaveReadyThreads() a const member functionLioncash
This function doesn't modify instance state, so the const qualifier can be added to it.
2018-08-11server_session: Provide more useful information and don't crash on bad IPC ↵bunnei
request.
2018-08-09hle_ipc: Make WriteToOutgoingCommandBuffer()'s reference parameter constLioncash
This function doesn't modify anything within the reference Thread instance.
2018-08-06client_port: Make all data members privateLioncash
These members don't need to be entirely exposed, we can instead expose an API to operate on them without directly needing to mutate them We can also guard against overflow/API misuse this way as well, given active_sessions is an unsigned value.
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.