aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
AgeCommit message (Collapse)Author
2018-07-24core_timing: Split off utility functions into core_timing_utilMerryMage
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-18Merge pull request #690 from lioncash/movebunnei
core/memory, core/hle/kernel: Use std::move where applicable
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-02Update clang formatJames Rowe
2018-07-02Rename logging macro back to LOG_*James Rowe
2018-06-21Kernel/Arbiters: Implement WaitForAddressMichael Scire
2018-06-02Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may ↵Subv
already have an assigned lock owner. This situation may happen like so: Thread 1 with low priority calls WaitProcessWideKey with timeout. Thread 2 with high priority calls WaitProcessWideKey without timeout. Thread 3 calls SignalProcessWideKey - Thread 2 acquires the lock and awakens. - Thread 1 can't acquire the lock and is put to sleep with the lock owner being Thread 2. Thread 1's timeout expires, with the lock owner still being set to Thread 2.
2018-05-30Kernel/Thread: Corrected a typo that caused the affinity mask to never be ↵Subv
changed.
2018-05-30Kernel/Thread: Corrected a typo in an assert about the processor id.Subv
2018-05-10thread: Rename mask to affinity_masks.bunnei
2018-05-10thread: Support core change on ResumeFromWait and improve ChangeCore.bunnei
2018-05-10thread: Initialize ideal_core and mask members.bunnei
2018-05-10threading: Reschedule only on cores that are necessary.bunnei
2018-05-10thread: Implement ChangeCore function.bunnei
2018-05-10core: Implement multicore support.bunnei
2018-04-30core_timing: Namespace all functions and constants in core_timing's headerLioncash
All of these variables and functions are related to timings and should be within the namespace.
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash
2018-04-25kernel: Migrate logging macros to fmt-compatible onesLioncash
2018-04-23Kernel: Implemented mutex priority inheritance.Subv
Verified with a hwtest and implemented based on reverse engineering. Thread A's priority will get bumped to the highest priority among all the threads that are waiting for a mutex that A holds. Once A releases the mutex and ownership is transferred to B, A's priority will return to normal and B's priority will be bumped.
2018-04-20Kernel: Remove unused ConditionVariable class.Subv
2018-04-20Kernel: Remove old and unused Mutex code.Subv
2018-04-20Kernel: Corrected the implementation of svcArbitrateLock and svcArbitrateUnlock.Subv
Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case. Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock. TODO: * Fix svcWaitProcessWideKey * Fix svcSignalProcessWideKey * Remove the Mutex class.
2018-03-31memory: Fix stack region.bunnei
2018-03-18thread: Add THREADSTATUS_WAIT_HLE_EVENT, remove THREADSTATUS_WAIT_ARB.bunnei
2018-03-16kernel: Move stack region outside of application heap.bunnei
2018-03-16MemoryState: Add additional memory states and improve naming.bunnei
2018-03-14core: Move process creation out of global state.bunnei
2018-02-27thread: Clear the process list on shutdown.Jules Blok
2018-02-18kernel: Use Scheduler class for threading.bunnei
2018-02-18kernel: Remove unused address_arbiter code.bunnei
2018-02-18 Kernel/IPC: Add a small delay after each SyncRequest to prevent thread ↵Subv
starvation. Ported from citra PR #3091 The delay specified here is from a Nintendo 3DS, and should be measured in a Nintendo Switch. This change is enough to prevent Puyo Puyo Tetris's main thread starvation.
2018-02-14thread: Silence formatting specifier warningsLioncash
2018-01-08Kernel: Allow chaining WaitSynchronization calls inside a wakeup callback.Subv
2018-01-08CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n30
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-02arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei
2017-12-31thread: Keep track of the initially created handle.bunnei
This is kinda crufty, but we need it for now to update guest state variables.
2017-12-30thread: Main thread should set thread handle to reg 1.bunnei
2017-12-30thread: Remove THUMB mode flag.bunnei
2017-12-30thread: Main thread should be ready by default, all others dormant.bunnei
2017-12-29kernel: Various 64-bit fixes in memory/process/threadbunnei
2017-10-31hle: Use Switch formatted result codes.bunnei
2017-10-19hle: Fix QueryMemory response for MemoryInfo.bunnei
2017-10-09Merge remote-tracking branch 'upstream/master' into nxbunnei
# Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
2017-10-09loader: Various improvements for NSO/NRO loaders.bunnei
2017-10-01Merge pull request #2971 from Subv/per_process_memopsSebastian Valle
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
2017-10-01Kernel/Thread: Added a helper function to get a thread's command buffer VAddr.Subv