summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: Move process creation out of global state.bunnei2018-03-141-1/+0
|
* kernel: Add ObjectAddressTable class.bunnei2018-01-011-2/+5
|
* Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner2017-05-301-84/+1
|
* Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner2017-05-301-79/+0
| | | | | Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
* Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner2017-05-251-0/+1
|
* Kernel: Add some asserts to enforce the invariants in the scheduler.Subv2017-01-051-0/+8
|
* Kernel: Remove a thread from all of its waiting objects' waiting_threads list when it is awoken.Subv2017-01-051-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
* Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on.Subv2017-01-051-1/+7
|
* Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv2017-01-041-8/+15
|
* Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv2017-01-041-8/+6
| | | | This will be useful when implementing mutex priority inheritance.
* Kernel: remove object's waiting thread if it is deadwwylele2016-12-161-1/+2
|
* Fixed the codestyle to match our clang-format rules.Subv2016-12-141-4/+5
|
* Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout.Subv2016-12-101-1/+6
|
* WaitSynch: Removed unused variables and reduced SharedPtr copies.Subv2016-12-091-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.
* Use boost remove_erase_if instead of the erase-remove idiomSubv2016-12-071-2/+3
|
* Improved the algorithm for GetHighestPriorityReadyThread.Subv2016-12-071-14/+13
|
* Threading: Added some utility functions and const correctness.Subv2016-12-041-7/+6
|
* Threading: Reworked the way our scheduler works.Subv2016-12-041-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.
* Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv2016-11-201-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
* implement wait tree widgetwwylele2016-09-221-0/+4
|
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-211-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+1
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-1/+2
|
* Kernel: Add more infrastructure to support different memory layoutsYuri Kunde Schlesner2015-08-161-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.
* Common: Cleanup key_map includes.Emmanuel Gil Peyrot2015-06-281-2/+0
|
* kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei2015-06-171-18/+4
|
* Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv2015-05-151-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.
* fixup!Subv2015-05-121-1/+3
|
* Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThreadSubv2015-05-111-2/+2
|
* Kernel: Remove unused g_main_thread variableYuri Kunde Schlesner2015-05-091-2/+0
|
* Kernel: Remove g_program_idYuri Kunde Schlesner2015-05-091-2/+0
| | | | This has been obsoleted by the field in Process.
* Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner2015-05-091-12/+2
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-1/+2
|
* Kernel: Properly initialize and shutdown all modules.bunnei2015-05-021-4/+7
|
* Kernel: Fixed default thread priority.bunnei2015-04-101-1/+1
|
* Build: Fixed some warningsSubv2015-02-121-2/+2
|
* Asserts: break/crash program, fit to style guide; log.h->assert.harchshift2015-02-111-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.
* Scheduler refactor Pt. 1Kevin Hartman2015-02-101-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.
* core: Fix some warnings on OSXLioncash2015-02-031-1/+0
|
* Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner2015-02-021-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.)
* Kernel: Fix bug in HandleTable::CloseYuri Kunde Schlesner2015-02-021-1/+1
|
* Kernel: Remove Object::GetHandle (it's not used anymore :D)Yuri Kunde Schlesner2015-02-021-4/+1
|
* Kernel: Introduce unique Object ids for debuggingYuri Kunde Schlesner2015-02-021-0/+2
|
* Kernel: Renamed some functions for clarity.bunnei2015-01-221-1/+1
| | | | | - ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
* Session: Change to a WaitObject.bunnei2015-01-221-1/+1
|
* Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs.bunnei2015-01-221-1/+1
|
* AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense.bunnei2015-01-221-1/+1
|
* Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei2015-01-221-2/+4
|
* WaitSynchronizationN: Implement return valuesbunnei2015-01-221-2/+2
|
* WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup.bunnei2015-01-221-3/+10
|
* Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei2015-01-221-0/+26
|
* Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner2015-01-091-13/+10
|
* Kernel: Don't re-assign object's handle when duplicating oneYuri Kunde Schlesner2015-01-091-1/+2
|
* Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner2015-01-091-1/+1
|
* Kernel: Move Thread's definition to the header fileYuri Kunde Schlesner2015-01-091-2/+1
|
* Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner2015-01-091-0/+1
|
* Merge pull request #255 from Subv/cbranch_3bunnei2015-01-091-1/+3
|\ | | | | Implemented timers
| * SVC: Implemented the Timer service calls.Subv2015-01-091-1/+3
| |
* | Threads: Use a dummy idle thread when no other are ready.Subv2015-01-081-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.
* Kernel: New handle managerYuri Kunde Schlesner2014-12-281-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.
* Rename ObjectPool to HandleTableYuri Kunde Schlesner2014-12-281-10/+10
|
* License changepurpasmart962014-12-211-2/+2
|
* Filesystem/Archives: Implemented the SaveData archiveSubv2014-12-181-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
* HLE: Rename namespaces to match move & fix initialization orderYuri Kunde Schlesner2014-12-161-5/+0
|
* HLE: Move kernel/archive.* to service/fs/Yuri Kunde Schlesner2014-12-161-1/+1
|
* Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-131-4/+4
|
* kernel: Shorten GetCountLioncash2014-12-041-6/+3
|
* kernel: Make some functions constLioncash2014-12-041-2/+2
|
* Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-191-3/+3
|
* Core: Get rid of unnecessary switch statement in KernelLioncash2014-09-151-41/+2
|
* core: Prune redundant includesarchshift2014-09-091-2/+0
|
* Core: Use std::array for managing kernel object spaceLioncash2014-08-191-2/+1
| | | | These avoid relying on memset for clearing the arrays.
* Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash2014-08-181-2/+2
| | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
* Archive: Added Init/Shutdown methods to reset kernel archive state.bunnei2014-07-051-0/+3
|
* Kernel: Removed unnecessary "#pragma once".bunnei2014-06-131-2/+0
|
* Kernel: Added freeing of kernel objects on emulator shutdown.bunnei2014-06-131-0/+4
|
* HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei2014-06-131-1/+1
|
* kernel: changed current default thread priority back to 0x30 - I think this is more correctbunnei2014-06-051-1/+1
|
* kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedulebunnei2014-06-021-1/+2
|
* kernel: refactored function naming to remove "__" prefixbunnei2014-05-231-5/+10
|
* thread: moved threading calls to the Kernel namespacebunnei2014-05-211-3/+3
|
* - created a Kernel namespacebunnei2014-05-211-25/+24
| | | | | - cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles
* changed "UID" to "Handle" to be a little more consistent with CTR namingbunnei2014-05-161-5/+5
|
* changed primary thread priority to 0x30 - this is typical, not 0x31bunnei2014-05-151-1/+2
|
* - added __KernelLoadExec functionbunnei2014-05-141-0/+11
| | | | - fixed some logging
* added initial kernel/thread modulesbunnei2014-05-101-0/+142