Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2020-02-11 | Kernel: Refactor synchronization to better match RE | Fernando Sahmkow | 1 | -0/+5 | |
2020-02-11 | Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. | Fernando Sahmkow | 1 | -11/+12 | |
2020-02-06 | wait_object: Make wait behavior only require one object to signal. | Zach Hilman | 1 | -11/+2 | |
- This was holdover from citra. | |||||
2020-01-26 | Kernel: Remove a few global instances from the kernel. | Fernando Sahmkow | 1 | -1/+1 | |
2020-01-26 | Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager. | Fernando Sahmkow | 1 | -1/+0 | |
This commit instends on better naming the new purpose of this classes. | |||||
2019-11-25 | kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) | bunnei | 1 | -8/+9 | |
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. | |||||
2019-10-15 | Kernel: Reverse global accessor removal. | Fernando Sahmkow | 1 | -1/+1 | |
2019-10-15 | Kernel: Corrections to Wait Objects clearing in which a thread could still be signalled after a timeout or a cancel. | Fernando Sahmkow | 1 | -3/+0 | |
2019-10-15 | Kernel: Remove global system accessor from WaitObject | Fernando Sahmkow | 1 | -1/+2 | |
2019-10-15 | Correct PrepareReschedule | Fernando Sahmkow | 1 | -2/+1 | |
2019-10-15 | Add PrepareReschedule where required. | Fernando Sahmkow | 1 | -0/+4 | |
2019-04-17 | kernel/thread: Unify wait synchronization types | Lioncash | 1 | -14/+15 | |
This is a holdover from Citra, where the 3DS has both WaitSynchronization1 and WaitSynchronizationN. The switch only has one form of wait synchronizing (literally WaitSynchonization). This allows us to throw out code that doesn't apply at all to the Switch kernel. Because of this unnecessary dichotomy within the wait synchronization utilities, we were also neglecting to properly handle waiting on multiple objects. While we're at it, we can also scrub out any lingering references to WaitSynchronization1/WaitSynchronizationN in comments, and change them to WaitSynchronization (or remove them if the mention no longer applies). | |||||
2019-04-17 | kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function | Lioncash | 1 | -1/+1 | |
This doesn't actually modify internal state of a wait object, so it can be const qualified. | |||||
2019-01-01 | core/kernel: Remove unnecessary inclusions | Lioncash | 1 | -1/+1 | |
Gets rid of a few unnecessary header dependencies in some source files. | |||||
2018-10-04 | kernel/thread: Make all instance variables private | Lioncash | 1 | -16/+15 | |
Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface. | |||||
2018-09-15 | Port #4182 from Citra: "Prefix all size_t with std::" | fearlessTobi | 1 | -1/+1 | |
2018-08-29 | kernel: Eliminate kernel global state | Lioncash | 1 | -0/+3 | |
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header. | |||||
2018-08-02 | kernel: Move object class to its own source files | Lioncash | 1 | -2/+1 | |
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-31 | kernel: Remove unnecessary includes | Lioncash | 1 | -2/+0 | |
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included. | |||||
2018-07-23 | hle: Remove config_mem.h/.cpp | Lioncash | 1 | -1/+0 | |
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 | hle: Remove shared_page.h/.cpp | Lioncash | 1 | -1/+0 | |
This is a holdover from citra that's essentially unused. | |||||
2018-07-20 | thread: Convert ThreadStatus into an enum class | Lioncash | 1 | -6/+6 | |
Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time. | |||||
2018-03-19 | thread: Add THREADSTATUS_WAIT_HLE_EVENT, remove THREADSTATUS_WAIT_ARB. | bunnei | 1 | -1/+2 | |
2018-01-09 | Kernel: Allow chaining WaitSynchronization calls inside a wakeup callback. | Subv | 1 | -4/+13 | |
2018-01-07 | wait_object: Refactor to allow waking up a single thread. | bunnei | 1 | -15/+22 | |
2017-09-30 | Fixed type conversion ambiguity | Huw Pascoe | 1 | -1/+1 | |
2017-09-28 | Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken. | Subv | 1 | -7/+4 | |
This change makes for a clearer (less confusing) path of execution in the scheduler, now the code to execute when a thread awakes is closer to the code that puts the thread to sleep (WaitSynch1, WaitSynchN). It also allows us to implement the special wake up behavior of ReplyAndReceive without hacking up WaitObject::WakeupAllWaitingThreads. If savestates are desired in the future, we can change this implementation to one similar to the CoreTiming event system, where we first register the callback functions at startup and assign their identifiers to the Thread callback variable instead of directly assigning a lambda to the wake up callback variable. | |||||
2017-05-30 | Kernel: Move WaitObject to a separate file | Yuri Kunde Schlesner | 1 | -112/+1 | |
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header. | |||||
2017-05-25 | Kernel: Centralize error definitions in errors.h | Yuri Kunde Schlesner | 1 | -0/+1 | |
2017-01-05 | Kernel: Add some asserts to enforce the invariants in the scheduler. | Subv | 1 | -0/+8 | |
2017-01-05 | Kernel: Remove a thread from all of its waiting objects' waiting_threads list when it is awoken. | Subv | 1 | -18/+4 | |
This fixes a potential bug where threads would not get removed from said list if they awoke after waiting with WaitSynchronizationN with wait_all = false | |||||
2017-01-05 | Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on. | Subv | 1 | -1/+7 | |
2017-01-04 | Kernel/Mutex: Update a mutex priority when a thread stops waiting on it. | Subv | 1 | -8/+15 | |
2017-01-04 | Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter. | Subv | 1 | -8/+6 | |
This will be useful when implementing mutex priority inheritance. | |||||
2016-12-16 | Kernel: remove object's waiting thread if it is dead | wwylele | 1 | -1/+2 | |
2016-12-14 | Fixed the codestyle to match our clang-format rules. | Subv | 1 | -4/+5 | |
2016-12-10 | Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout. | Subv | 1 | -1/+6 | |
2016-12-09 | WaitSynch: Removed unused variables and reduced SharedPtr copies. | Subv | 1 | -10/+4 | |
Define a variable with the value of the sync timeout error code. Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call. | |||||
2016-12-07 | Use boost remove_erase_if instead of the erase-remove idiom | Subv | 1 | -2/+3 | |
2016-12-07 | Improved the algorithm for GetHighestPriorityReadyThread. | Subv | 1 | -14/+13 | |
2016-12-04 | Threading: Added some utility functions and const correctness. | Subv | 1 | -7/+6 | |
2016-12-04 | Threading: Reworked the way our scheduler works. | Subv | 1 | -5/+54 | |
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then. The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback. This new implementation is based off reverse-engineering of the real kernel. See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling. | |||||
2016-11-20 | Kernel/Loader: Grab the system mode from the NCCH ExHeader. | Subv | 1 | -4/+2 | |
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849 | |||||
2016-09-22 | implement wait tree widget | wwylele | 1 | -0/+4 | |
2016-09-21 | Use negative priorities to avoid special-casing the self-include | Yuri Kunde Schlesner | 1 | -1/+1 | |
2016-09-21 | Remove empty newlines in #include blocks. | Emmanuel Gil Peyrot | 1 | -3/+1 | |
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. | |||||
2016-09-18 | Sources: Run clang-format on everything. | Emmanuel Gil Peyrot | 1 | -1/+2 | |
2015-08-16 | Kernel: Add more infrastructure to support different memory layouts | Yuri Kunde Schlesner | 1 | -3/+16 | |
This adds some structures necessary to support multiple memory regions in the future. It also adds support for different system memory types and the new linear heap mapping at 0x30000000. | |||||
2015-06-28 | Common: Cleanup key_map includes. | Emmanuel Gil Peyrot | 1 | -2/+0 | |
2015-06-17 | kernel: Fix svcWaitSynch to always acquire requested wait objects. | bunnei | 1 | -18/+4 | |
2015-05-15 | Core/ResourceLimits: Implemented the basic structure of ResourceLimits. | Subv | 1 | -0/+3 | |
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues. Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create. | |||||
2015-05-12 | fixup! | Subv | 1 | -1/+3 | |
2015-05-11 | Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread | Subv | 1 | -2/+2 | |
2015-05-09 | Kernel: Remove unused g_main_thread variable | Yuri Kunde Schlesner | 1 | -2/+0 | |
2015-05-09 | Kernel: Remove g_program_id | Yuri Kunde Schlesner | 1 | -2/+0 | |
This has been obsoleted by the field in Process. | |||||
2015-05-09 | Kernel: Introduce skeleton Process class to hold process data | Yuri Kunde Schlesner | 1 | -12/+2 | |
2015-05-07 | Common: Remove common.h | Yuri Kunde Schlesner | 1 | -1/+2 | |
2015-05-02 | Kernel: Properly initialize and shutdown all modules. | bunnei | 1 | -4/+7 | |
2015-04-10 | Kernel: Fixed default thread priority. | bunnei | 1 | -1/+1 | |
2015-02-12 | Build: Fixed some warnings | Subv | 1 | -2/+2 | |
2015-02-11 | Asserts: break/crash program, fit to style guide; log.h->assert.h | archshift | 1 | -2/+2 | |
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft. | |||||
2015-02-10 | Scheduler refactor Pt. 1 | Kevin Hartman | 1 | -5/+1 | |
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid for a thread at any given point in the system. * Removes dead code from thread.cpp. * Moves the implementation of resetting a ThreadContext to the corresponding core's implementation. Other changes: * Fixed comments in arm interfaces. * Updated comments in thread.cpp * Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp. * Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation. | |||||
2015-02-03 | core: Fix some warnings on OSX | Lioncash | 1 | -1/+0 | |
2015-02-02 | Kernel: Make WaitObjects share ownership of Threads waiting on them | Yuri Kunde Schlesner | 1 | -4/+4 | |
During normal operation, a thread waiting on an WaitObject and the object hold mutual references to each other for the duration of the wait. If a process is forcefully terminated (The CTR kernel has a SVC to do this, TerminateProcess, though no equivalent exists for threads.) its threads would also be stopped and destroyed, leaving dangling pointers in the WaitObjects. The solution is to simply have the Thread remove itself from WaitObjects when it is stopped. The vector of Threads in WaitObject has also been changed to hold SharedPtrs, just in case. (Better to have a reference cycle than a crash.) | |||||
2015-02-02 | Kernel: Fix bug in HandleTable::Close | Yuri Kunde Schlesner | 1 | -1/+1 | |
2015-02-02 | Kernel: Remove Object::GetHandle (it's not used anymore :D) | Yuri Kunde Schlesner | 1 | -4/+1 | |
2015-02-02 | Kernel: Introduce unique Object ids for debugging | Yuri Kunde Schlesner | 1 | -0/+2 | |
2015-01-22 | Kernel: Renamed some functions for clarity. | bunnei | 1 | -1/+1 | |
- ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads. | |||||
2015-01-22 | Session: Change to a WaitObject. | bunnei | 1 | -1/+1 | |
2015-01-22 | Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs. | bunnei | 1 | -1/+1 | |
2015-01-22 | AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense. | bunnei | 1 | -1/+1 | |
2015-01-22 | Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks. | bunnei | 1 | -2/+4 | |
2015-01-22 | WaitSynchronizationN: Implement return values | bunnei | 1 | -2/+2 | |
2015-01-22 | WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup. | bunnei | 1 | -3/+10 | |
2015-01-22 | Kernel: Added WaitObject and changed "waitable" objects inherit from it. | bunnei | 1 | -0/+26 | |
2015-01-09 | Kernel: Start using boost::intrusive_ptr for lifetime management | Yuri Kunde Schlesner | 1 | -13/+10 | |
2015-01-09 | Kernel: Don't re-assign object's handle when duplicating one | Yuri Kunde Schlesner | 1 | -1/+2 | |
2015-01-09 | Thread: Reduce use of Handles and move some funcs to inside the class. | Yuri Kunde Schlesner | 1 | -1/+1 | |
2015-01-09 | Kernel: Move Thread's definition to the header file | Yuri Kunde Schlesner | 1 | -2/+1 | |
2015-01-09 | Move ThreadContext to core/core.h and deal with the fallout | Yuri Kunde Schlesner | 1 | -0/+1 | |
2015-01-09 | SVC: Implemented the Timer service calls. | Subv | 1 | -1/+3 | |
2015-01-08 | Threads: Use a dummy idle thread when no other are ready. | Subv | 1 | -0/+2 | |
This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again. | |||||
2014-12-28 | Kernel: New handle manager | Yuri Kunde Schlesner | 1 | -51/+67 | |
This handle manager more closely mirrors the behaviour of the CTR-OS one. In addition object ref-counts and support for DuplicateHandle have been added. Note that support for DuplicateHandle is still experimental, since parts of the kernel still use Handles internally, which will likely cause troubles if two different handles to the same object are used to e.g. wait on a synchronization primitive. | |||||
2014-12-28 | Rename ObjectPool to HandleTable | Yuri Kunde Schlesner | 1 | -10/+10 | |
2014-12-21 | License change | purpasmart96 | 1 | -2/+2 | |
2014-12-18 | Filesystem/Archives: Implemented the SaveData archive | Subv | 1 | -0/+1 | |
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information Got rid of the code duplication in File and Directory Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive. FS_U: Use the correct error code when a file wasn't found | |||||
2014-12-16 | HLE: Rename namespaces to match move & fix initialization order | Yuri Kunde Schlesner | 1 | -5/+0 | |
2014-12-16 | HLE: Move kernel/archive.* to service/fs/ | Yuri Kunde Schlesner | 1 | -1/+1 | |
2014-12-13 | Convert old logging calls to new logging macros | Yuri Kunde Schlesner | 1 | -4/+4 | |
2014-12-04 | kernel: Shorten GetCount | Lioncash | 1 | -6/+3 | |
2014-12-04 | kernel: Make some functions const | Lioncash | 1 | -2/+2 | |
2014-11-19 | Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated | Emmanuel Gil Peyrot | 1 | -3/+3 | |
2014-09-15 | Core: Get rid of unnecessary switch statement in Kernel | Lioncash | 1 | -41/+2 | |
2014-09-09 | core: Prune redundant includes | archshift | 1 | -2/+0 | |
2014-08-19 | Core: Use std::array for managing kernel object space | Lioncash | 1 | -2/+1 | |
These avoid relying on memset for clearing the arrays. | |||||
2014-08-18 | Core: Alter the kernel string functions to use std::string instead of const char*. | Lioncash | 1 | -2/+2 | |
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names. | |||||
2014-07-05 | Archive: Added Init/Shutdown methods to reset kernel archive state. | bunnei | 1 | -0/+3 | |
2014-06-13 | Kernel: Removed unnecessary "#pragma once". | bunnei | 1 | -2/+0 | |
2014-06-13 | Kernel: Added freeing of kernel objects on emulator shutdown. | bunnei | 1 | -0/+4 | |
2014-06-13 | HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) | bunnei | 1 | -1/+1 | |
2014-06-05 | kernel: changed current default thread priority back to 0x30 - I think this is more correct | bunnei | 1 | -1/+1 | |
2014-06-02 | kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedule | bunnei | 1 | -1/+2 | |
2014-05-23 | kernel: refactored function naming to remove "__" prefix | bunnei | 1 | -5/+10 | |
2014-05-21 | thread: moved threading calls to the Kernel namespace | bunnei | 1 | -3/+3 | |
2014-05-21 | - created a Kernel namespace | bunnei | 1 | -25/+24 | |
- cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles | |||||
2014-05-16 | changed "UID" to "Handle" to be a little more consistent with CTR naming | bunnei | 1 | -5/+5 | |
2014-05-15 | changed primary thread priority to 0x30 - this is typical, not 0x31 | bunnei | 1 | -1/+2 | |
2014-05-14 | - added __KernelLoadExec function | bunnei | 1 | -0/+11 | |
- fixed some logging | |||||
2014-05-10 | added initial kernel/thread modules | bunnei | 1 | -0/+142 | |