aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
AgeCommit message (Collapse)Author
2015-08-16Kernel: Add more infrastructure to support different memory layoutsYuri Kunde Schlesner
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-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot
2015-06-16kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei
2015-05-14Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv
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-11fixup!Subv
2015-05-11Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThreadSubv
2015-05-08Kernel: Remove unused g_main_thread variableYuri Kunde Schlesner
2015-05-08Kernel: Remove g_program_idYuri Kunde Schlesner
This has been obsoleted by the field in Process.
2015-05-08Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner
2015-05-07Common: Remove common.hYuri Kunde Schlesner
2015-05-01Kernel: Properly initialize and shutdown all modules.bunnei
2015-04-09Kernel: Fixed default thread priority.bunnei
2015-02-12Build: Fixed some warningsSubv
2015-02-10Asserts: break/crash program, fit to style guide; log.h->assert.harchshift
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-09Scheduler refactor Pt. 1Kevin Hartman
* 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-03core: Fix some warnings on OSXLioncash
2015-02-02Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner
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-02Kernel: Fix bug in HandleTable::CloseYuri Kunde Schlesner
2015-02-02Kernel: Remove Object::GetHandle (it's not used anymore :D)Yuri Kunde Schlesner
2015-02-02Kernel: Introduce unique Object ids for debuggingYuri Kunde Schlesner
2015-01-21Kernel: Renamed some functions for clarity.bunnei
- ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
2015-01-21Session: Change to a WaitObject.bunnei
2015-01-21Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs.bunnei
2015-01-21AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that ↵bunnei
made no sense.
2015-01-21Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei
2015-01-21WaitSynchronizationN: Implement return valuesbunnei
2015-01-21WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup.bunnei
2015-01-21Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner
2015-01-09Kernel: Don't re-assign object's handle when duplicating oneYuri Kunde Schlesner
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner
2015-01-09Kernel: Move Thread's definition to the header fileYuri Kunde Schlesner
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner
2015-01-08Merge pull request #255 from Subv/cbranch_3bunnei
Implemented timers
2015-01-08SVC: Implemented the Timer service calls.Subv
2015-01-07Threads: Use a dummy idle thread when no other are ready.Subv
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-28Kernel: New handle managerYuri Kunde Schlesner
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-28Rename ObjectPool to HandleTableYuri Kunde Schlesner
2014-12-20License changepurpasmart96
2014-12-17Filesystem/Archives: Implemented the SaveData archiveSubv
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-16HLE: Rename namespaces to match move & fix initialization orderYuri Kunde Schlesner
2014-12-16HLE: Move kernel/archive.* to service/fs/Yuri Kunde Schlesner
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner
2014-12-03kernel: Shorten GetCountLioncash
2014-12-03kernel: Make some functions constLioncash
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP ↵Emmanuel Gil Peyrot
or generated
2014-09-14Core: Get rid of unnecessary switch statement in KernelLioncash
2014-09-08core: Prune redundant includesarchshift
2014-08-19Core: Use std::array for managing kernel object spaceLioncash
These avoid relying on memset for clearing the arrays.
2014-08-17Core: Alter the kernel string functions to use std::string instead of const ↵Lioncash
char*. Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.