summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp (unfollow)
Commit message (Expand)AuthorFilesLines
2018-07-03Rename logging macro back to LOG_*James Rowe1-5/+5
2018-06-21Kernel/Arbiters: Implement WaitForAddressMichael Scire1-0/+6
2018-06-02Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.Subv1-2/+5
2018-05-31Kernel/Thread: Corrected a typo that caused the affinity mask to never be changed.Subv1-2/+2
2018-05-30Kernel/Thread: Corrected a typo in an assert about the processor id.Subv1-1/+1
2018-05-11thread: Rename mask to affinity_masks.bunnei1-2/+2
2018-05-11thread: Support core change on ResumeFromWait and improve ChangeCore.bunnei1-37/+68
2018-05-11thread: Initialize ideal_core and mask members.bunnei1-0/+2
2018-05-11threading: Reschedule only on cores that are necessary.bunnei1-1/+1
2018-05-11thread: Implement ChangeCore function.bunnei1-1/+52
2018-05-11core: Implement multicore support.bunnei1-8/+8
2018-04-30core_timing: Namespace all functions and constants in core_timing's headerLioncash1-1/+2
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash1-2/+2
2018-04-26kernel: Migrate logging macros to fmt-compatible onesLioncash1-7/+8
2018-04-23Kernel: Implemented mutex priority inheritance.Subv1-2/+39
2018-04-21Kernel: Remove unused ConditionVariable class.Subv1-9/+0
2018-04-21Kernel: Remove old and unused Mutex code.Subv1-3/+0
2018-04-21Kernel: Corrected the implementation of svcArbitrateLock and svcArbitrateUnlock.Subv1-1/+12
2018-03-31memory: Fix stack region.bunnei1-1/+1
2018-03-19thread: Add THREADSTATUS_WAIT_HLE_EVENT, remove THREADSTATUS_WAIT_ARB.bunnei1-18/+3
2018-03-16kernel: Move stack region outside of application heap.bunnei1-1/+1
2018-03-16MemoryState: Add additional memory states and improve naming.bunnei1-1/+1
2018-03-14core: Move process creation out of global state.bunnei1-2/+2
2018-02-27thread: Clear the process list on shutdown.Jules Blok1-1/+3
2018-02-18kernel: Use Scheduler class for threading.bunnei1-155/+14
2018-02-18kernel: Remove unused address_arbiter code.bunnei1-34/+0
2018-02-18 Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation.Subv1-0/+1
2018-02-14thread: Silence formatting specifier warningsLioncash1-2/+3
2018-01-09Kernel: Allow chaining WaitSynchronization calls inside a wakeup callback.Subv1-8/+17
2018-01-09CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n301-3/+2
2018-01-03arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei1-4/+2
2017-12-31thread: Keep track of the initially created handle.bunnei1-1/+2
2017-12-30thread: Main thread should set thread handle to reg 1.bunnei1-1/+4
2017-12-30thread: Remove THUMB mode flag.bunnei1-1/+1
2017-12-30thread: Main thread should be ready by default, all others dormant.bunnei1-4/+3
2017-12-29kernel: Various 64-bit fixes in memory/process/threadbunnei1-5/+5
2017-11-01hle: Use Switch formatted result codes.bunnei1-3/+2
2017-10-20hle: Fix QueryMemory response for MemoryInfo.bunnei1-1/+1
2017-10-10loader: Various improvements for NSO/NRO loaders.bunnei1-1/+1
2017-10-01Kernel/Thread: Added a helper function to get a thread's command buffer VAddr.Subv1-0/+6
2017-09-30kernel: Various threading fixes to support 64-bit addressing.bunnei1-3/+3
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-9/+9
2017-09-28Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken.Subv1-3/+10
2017-09-27Kernel/Thread: Allow specifying which process a thread belongs to when creating it.Subv1-8/+9
2017-09-24memory: Add GetCurrentPageTable/SetCurrentPageTableMerryMage1-7/+4
2017-09-15Kernel/Threads: Don't clear the CPU instruction cache when performing a context switch from an idle thread into a thread in the same process.Subv1-1/+3
2017-09-10Kernel/Memory: Switch the current page table when a new process is scheduled.Subv1-0/+10
2017-08-22Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.Subv1-5/+1
2017-06-19ResultVal: Remove MoveFrom()Yuri Kunde Schlesner1-2/+2
2017-05-30Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner1-0/+1
2017-05-25Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner1-8/+16
2017-01-11Threads: Check the process' resource limit for the max allowed priority when creating a thread and remove the priority clamping code.Subv1-8/+2
2017-01-11Thread: Added priority range checking to svcSetThreadPriority and removed priority clamping code from Thread::SetPriority.Subv1-18/+2
2017-01-06Kernel: Don't attempt to yield execution in SleepThread(0) if there are no available threads to run.Subv1-0/+4
2017-01-05Kernel: Remove some unused functions.Subv1-23/+0
2017-01-05Kernel: Removed the priority boost code for starved threads.Subv1-27/+0
2017-01-05Kernel: Add some asserts to enforce the invariants in the scheduler.Subv1-2/+5
2017-01-05Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on.Subv1-0/+5
2017-01-04Kernel: Use different thread statuses when a thread calls WaitSynchronization1 and WaitSynchronizationN with wait_all = true.Subv1-4/+7
2017-01-04Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexesSubv1-4/+17
2017-01-04Kernel/Mutex: Implemented priority inheritance.Subv1-3/+3
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv1-3/+3
2016-12-22ThreadContext: Move from "core" to "arm_interface".bunnei1-3/+3
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei1-3/+3
2016-12-22core: Remove HLE module, consolidate code & various cleanups.bunnei1-4/+1
2016-12-22core: Consolidate core and system state, remove system module & cleanups.bunnei1-3/+3
2016-12-17Thread: remove the thread from the thread list when exitingwwylele1-2/+9
2016-12-10Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout.Subv1-0/+4
2016-12-04Threading: Reworked the way our scheduler works.Subv1-94/+3
2016-10-20Fix typosRicardo de Almeida Gonzaga1-1/+1
2016-09-22implement wait tree widgetwwylele1-0/+4
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-3/+1
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-4/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-49/+65
2016-09-15arm: ResetContext shouldn't be part of ARM_Interface.bunnei1-1/+17
2016-06-04Thread: update timeout when rerunning WaitSynchwwylele1-0/+49
2016-05-30Switch context on the same thread if necessarywwylele1-2/+6
2016-05-21Kernel/Thread: Remove use of Memory::GetPointerMerryMage1-1/+1
2016-05-17Set fpscr for new threadsJannik Vogel1-0/+2
2016-05-07Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.Subv1-17/+67
2016-03-21hle: Get rid of global access to g_rescheduleLioncash1-1/+2
2015-12-28SVC: Fixed ArbitrateAddress to behave as it does on hardware.Subv1-1/+1
2015-12-01Kernel: Implement svcGetSystemInfoYuri Kunde Schlesner1-0/+3
2015-10-07Silence -Wsign-compare warnings.Rohit Nirmal1-1/+1
2015-08-16Kernel: Implement svcGetProcessInfo in a basic wayYuri Kunde Schlesner1-1/+3
2015-07-26dyncom: Rename armdefs.h to armstate.hLioncash1-1/+1
2015-07-21Kernel/Scheduling: Clean up a thread's wait_objects when its scheduled.Subv1-0/+8
2015-07-17Ensure all kernel objects are released during shutdownYuri Kunde Schlesner1-7/+14
2015-06-17kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei1-50/+26
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-4/+4
2015-05-21Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.bunnei1-0/+6
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+1
2015-05-14thread: Fix a conditional check in RescheduleLioncash1-1/+1
2015-05-12Thread: Remove the idle threadYuri Kunde Schlesner1-27/+19
2015-05-12Core/Memory: Add TLS support for creating up to 300 threadsSubv1-6/+15
2015-05-12Core/Scheduling: Prepare the new priority in the thread queue when svcSetPriority is calledSubv1-0/+2
2015-05-11Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThreadSubv1-0/+2
2015-05-11Thread: Correctly set main thread initial stack positionYuri Kunde Schlesner1-2/+2
2015-05-11fixup! Set the TLS address in the schedulerSubv1-2/+5
2015-05-11Core/Memory: Give every emulated thread it's own TLS area.Subv1-1/+9
2015-05-09Memory: Re-organize and rename memory area address constantsYuri Kunde Schlesner1-2/+3
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-1/+3
2015-05-02Kernel: Properly initialize and shutdown all modules.bunnei1-2/+8
2015-04-10Kernel: Implemented priority inheritance for mutexes.bunnei1-3/+7
2015-04-10Thread: Implement priority boost for starved threads.bunnei1-12/+36
2015-02-20Misc cleanup of common and related functionsarchshift1-2/+3
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift1-8/+6
2015-02-10Scheduler refactor Pt. 1Kevin Hartman1-185/+175
2015-02-02Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner1-8/+0
2015-02-02Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner1-0/+3
2015-02-02Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner1-2/+2
2015-02-02Mutex: Replace g_mutex_held_locks with a set inside ThreadYuri Kunde Schlesner1-0/+3
2015-02-02Kernel: Introduce unique Object ids for debuggingYuri Kunde Schlesner1-5/+5
2015-02-02Kernel: Use separate Handle tables for CoreTiming userdataYuri Kunde Schlesner1-11/+11
2015-02-02Thread: Modernize two functions that slipped through previous rebasesYuri Kunde Schlesner1-5/+4
2015-02-01arm: Clean up ARMul_StateLioncash1-1/+1
2015-01-22Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup.bunnei1-15/+28
2015-01-22Thread: Use std::find in CheckWait_WaitObject.bunnei1-4/+5
2015-01-22Mutex: Cleanup and remove redundant code.bunnei1-1/+1
2015-01-22Kernel: Renamed some functions for clarity.bunnei1-1/+1
2015-01-22Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.bunnei1-7/+5
2015-01-22WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.bunnei1-2/+2
2015-01-22Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.bunnei1-1/+1
2015-01-22AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense.bunnei1-17/+25
2015-01-22Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei1-46/+19
2015-01-22WaitSynchronizationN: Refactor to fix several bugsbunnei1-33/+28
2015-01-22Kernel: Separate WaitSynchronization into Wait and Acquire methods.bunnei1-1/+5
2015-01-22WaitSynchronizationN: Implement return valuesbunnei1-19/+75
2015-01-22Thread: Keep track of multiple wait objects.bunnei1-11/+24
2015-01-22Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei1-9/+2
2015-01-11Thread: Prevent waking a thread multiple times.Subv1-0/+3
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner1-33/+30
2015-01-09Thread: Fix nullptr access in a logging functionYuri Kunde Schlesner1-1/+2
2015-01-09Thread: Rename thread_queue => thread_listYuri Kunde Schlesner1-6/+6
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner1-213/+127
2015-01-09Kernel: Move Thread's definition to the header fileYuri Kunde Schlesner1-51/+9
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner1-4/+5
2015-01-09SVC: Fixed SleepThread.Subv1-8/+32
2015-01-08Threads: Use a dummy idle thread when no other are ready.Subv1-1/+22
2015-01-07Common: Clean up ThreadQueueListYuri Kunde Schlesner1-1/+1
2014-12-28Kernel: New handle managerYuri Kunde Schlesner1-1/+2
2014-12-28Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner1-2/+2
2014-12-28Rename ObjectPool to HandleTableYuri Kunde Schlesner1-11/+11
2014-12-21License changepurpasmart961-1/+1
2014-12-21Thread: Wait current thread on svc_SleepThreadbunnei1-20/+33
2014-12-20Kernel: Implement support for current thread pseudo-handleYuri Kunde Schlesner1-2/+1
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-12/+12
2014-12-09Thread: Fixed to wait on address when in arbitration.bunnei1-10/+19
2014-12-07Mutex: Release all held mutexes when a thread exits.Subv1-0/+4
2014-12-04Threads: Remove a redundant function.Subv1-9/+1
2014-12-04Threads: Implemented a sequential thread idSubv1-3/+13
2014-12-04SVC: Implemented GetThreadId.Subv1-0/+16
2014-11-26Thread: Check that thread is actually in "wait state" when verifying wait.bunnei1-1/+1
2014-11-24Use pointers instead of passing handles around in some functions.Yuri Kunde Schlesner1-19/+15
2014-11-24Remove duplicated docs/update them for changed parameters.Yuri Kunde Schlesner1-5/+0
2014-11-24HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner1-21/+30
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot1-19/+19
2014-11-19Add static to some variablesLioncash1-22/+22
2014-10-26Add `override` keyword through the code.Yuri Kunde Schlesner1-4/+4
2014-09-09core: Prune redundant includesarchshift1-3/+0
2014-08-31Threading: Fix thread starting to execute first instruction correctly.bunnei1-0/+5
2014-08-28Threading: Fix thread starting to execute first instruction correctly.bunnei1-0/+5
2014-08-18Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash1-10/+7
2014-08-07Thread: Added more descriptive comment to WaitCurrentThread.bunnei1-1/+5
2014-07-09Thread: Added functions to resume threads from address arbitration.bunnei1-0/+37
2014-06-13Thread: Renamed occurrences of "t" to "thread" to improve readability.bunnei1-48/+45
2014-06-13Thread: Cleaned up VerifyWait, fixed issue where nullptr msg could unnecessarily be logged.bunnei1-9/+7
2014-06-13HLE: Removed usnused EatCycles function.bunnei1-9/+0
2014-06-13Thread: Moved position of * in arguments.bunnei1-2/+2
2014-06-13Thread: Updated VerifyWait to be more readable (but functionally the same).bunnei1-4/+3
2014-06-13HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei1-7/+7
2014-06-13HLE: Updated various handle debug assertions to be more clear.bunnei1-2/+2
2014-06-13Kernel: Updated several member functions to be constbunnei1-3/+3
2014-06-13Thread: Fixed bug with ResetThread where cpu_registers[15] was being incorrectly setbunnei1-1/+1
2014-06-13Kernel: Made SyncRequest not pure virtual, with a default implementation of error (as this is not required for all kernel objects)bunnei1-10/+0
2014-06-13Kernel: Added real support for thread and event blockingbunnei1-33/+88
2014-06-02svc: added GetThreadPriority and SetThreadPriority, added (incomplete) DuplicateHandle supportbunnei1-0/+45
2014-06-02kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedulebunnei1-3/+3
2014-06-01thread: updated Reschedule to sit at a synchronization barrier when no other threads are ready for executionbunnei1-0/+18
2014-05-27kernel: added WaitSynchronization method to Kernel::Objectbunnei1-0/+11
2014-05-27kernel: updated SyncRequest to take boolean thread wait result as a parameterbunnei1-2/+6
2014-05-27kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequestbunnei1-0/+5
2014-05-23thread: renamed "WaitCurThread" to "WaitCurrentThread", removed unused "reason" argumentbunnei1-2/+2
2014-05-23thread: removed unused SwitchContext/Reschedule reason field, added missing arg parameter to SVC CreateThreadbunnei1-3/+3
2014-05-23kernel: refactored function naming to remove "__" prefixbunnei1-39/+39
2014-05-23thread: moved ThreadStatus/WaitType to header, added support for arg on CreateThread, added correct CPSR resetbunnei1-34/+15
2014-05-22thread: fixed bug where result of __NextThread was not being properly checked when NULLbunnei1-1/+1
2014-05-21thread: added correct lowest thread priority, added a thread priority check, and added some commentsbunnei1-0/+3
2014-05-21thread: exposed ResumeThreadFromWait function for use in other kernel modulesbunnei1-8/+8
2014-05-21thread: moved threading calls to the Kernel namespacebunnei1-89/+95
2014-05-21ARM_Interface: added SaveContext and LoadContext functions for HLE thread switchingbunnei1-36/+2
2014-05-21renamed "syscall" module to "svc" (more accurate naming)bunnei1-1/+1
2014-05-21thread: whitespace change - fixed * and & placementbunnei1-25/+25
2014-05-21- created a Kernel namespacebunnei1-9/+9
2014-05-19- moved Handle/Result definitions to kernel.hbunnei1-2/+0
2014-05-17changed a commentbunnei1-1/+1
2014-05-17- added enum ThreadProcessorIdbunnei1-51/+90
2014-05-17- replaced KERNELOBJECT_MAX_NAME_LENGTH with KERNEL_MAX_NAME_LENGTHbunnei1-4/+5
2014-05-16completely gutted/refactored threading code to be simplerbunnei1-616/+228
2014-05-15- added helper function for __KernelCreateThreadbunnei1-4/+70
2014-05-14fixed thread reset to not set stack addressbunnei1-1/+1
2014-05-14various cleanups / remove unused codebunnei1-65/+28
2014-05-14added a bunch of threading code, recycled from PPSSPP, with lots of hacks in for 3DS... doesn't really do much yet. Just a jumping off pointbunnei1-64/+524
2014-05-10added initial kernel/thread modulesbunnei1-0/+228