Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | HLE: Rename namespaces to match move & fix initialization order | Yuri Kunde Schlesner | 2014-12-16 | 1 | -5/+0 |
| | |||||
* | HLE: Move kernel/archive.* to service/fs/ | Yuri Kunde Schlesner | 2014-12-16 | 3 | -534/+1 |
| | |||||
* | Remove SyncRequest from K::Object and create a new K::Session type | Yuri Kunde Schlesner | 2014-12-15 | 3 | -38/+75 |
| | | | | | | | This is a first step at fixing the conceptual insanity that is our handling of service and IPC calls. For now, interfaces still directly derived from Session because we don't have the infrastructure to do it properly. (That is, Processes and scheduling them.) | ||||
* | Kernel/Semaphore: Small style change | Subv | 2014-12-13 | 1 | -1/+1 |
| | |||||
* | Kernel/Semaphores: Invert the available count checking. | Subv | 2014-12-13 | 1 | -11/+9 |
| | | | | Same semantics, idea by @yuriks | ||||
* | Kernel/Semaphores: Addressed some issues. | Subv | 2014-12-13 | 2 | -32/+18 |
| | |||||
* | Semaphore: Removed an unneeded function | Subv | 2014-12-13 | 1 | -5/+0 |
| | |||||
* | Semaphores: Addressed some style issues | Subv | 2014-12-13 | 1 | -6/+5 |
| | |||||
* | Semaphore: Implemented the initial_count parameter. | Subv | 2014-12-13 | 2 | -5/+7 |
| | |||||
* | SVC: Implemented ReleaseSemaphore. | Subv | 2014-12-13 | 2 | -16/+64 |
| | | | | This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has | ||||
* | SVC: Implemented svcCreateSemaphore | Subv | 2014-12-13 | 2 | -0/+98 |
| | | | | | ToDo: Implement svcReleaseSemaphore * Some testing against hardware needed | ||||
* | kernel: Remove unused log arguments | Lioncash | 2014-12-13 | 1 | -3/+3 |
| | |||||
* | Convert old logging calls to new logging macros | Yuri Kunde Schlesner | 2014-12-13 | 6 | -72/+45 |
| | |||||
* | Merge pull request #256 from Subv/mutex | bunnei | 2014-12-11 | 3 | -37/+67 |
|\ | | | | | Kernel/Mutex: Properly lock the mutex when a thread enters it | ||||
| * | Mutex: Remove some forward declarations | Subv | 2014-12-07 | 1 | -16/+15 |
| | | | | | | | | Moved Mutex::WaitSynchronization to the end of the file. | ||||
| * | Mutex: Release all held mutexes when a thread exits. | Subv | 2014-12-07 | 3 | -22/+56 |
| | | |||||
| * | Mutex: Properly lock the mutex when a thread enters it | Subv | 2014-12-06 | 1 | -12/+9 |
| | | | | | | | | Also resume only the next immediate thread waiting for the mutex when it is released, instead of resuming them all. | ||||
* | | Thread: Fixed to wait on address when in arbitration. | bunnei | 2014-12-09 | 3 | -11/+31 |
| | | |||||
* | | Make OpenDirectory fail if the directory doesn't exist | archshift | 2014-12-07 | 1 | -0/+5 |
|/ | | | | | | | This is in line with what the hardware itself does. It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails. Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code . | ||||
* | Merge pull request #250 from Subv/cbranch_2 | bunnei | 2014-12-05 | 2 | -0/+26 |
|\ | | | | | SVC: Implemented GetThreadId. | ||||
| * | Threads: Remove a redundant function. | Subv | 2014-12-04 | 1 | -9/+1 |
| | | | | | | | | Use the next_thread_id variable directly. | ||||
| * | Threads: Implemented a sequential thread id | Subv | 2014-12-04 | 2 | -4/+19 |
| | | |||||
| * | SVC: Implemented GetThreadId. | Subv | 2014-12-04 | 2 | -0/+19 |
| | | | | | | | | For now threads are using their Handle value as their Id, it should not really cause any problems because Handle values are unique in Citra, but it should be changed. I left a ToDo there because this is not correct behavior as per hardware. | ||||
* | | Merge pull request #222 from archshift/renamexyz | bunnei | 2014-12-05 | 2 | -33/+74 |
|\ \ | | | | | | | Implemented RenameFile and RenameDirectory in FS:USER | ||||
| * | | Updated archive.cpp functions for proper error handling | archshift | 2014-12-04 | 2 | -65/+36 |
| | | | |||||
| * | | Implemented RenameDirectory in FS:USER | archshift | 2014-11-25 | 2 | -0/+35 |
| | | | |||||
| * | | Implemented RenameFile in FS:USER | archshift | 2014-11-25 | 2 | -0/+35 |
| | | | |||||
* | | | kernel: Shorten GetCount | Lioncash | 2014-12-04 | 1 | -6/+3 |
| | | | |||||
* | | | kernel: Make some functions const | Lioncash | 2014-12-04 | 2 | -4/+4 |
| |/ |/| | |||||
* | | Merge pull request #225 from bunnei/fix-release-mutex | bunnei | 2014-11-30 | 1 | -8/+7 |
|\ \ | | | | | | | Mutex: Changed behavior to always release mutex for all threads. | ||||
| * | | Mutex: Changed behavior to always release mutex for all threads. | bunnei | 2014-11-26 | 1 | -8/+7 |
| |/ | |||||
* / | Thread: Check that thread is actually in "wait state" when verifying wait. | bunnei | 2014-11-26 | 1 | -1/+1 |
|/ | |||||
* | Use pointers instead of passing handles around in some functions. | Yuri Kunde Schlesner | 2014-11-24 | 1 | -19/+15 |
| | |||||
* | Remove duplicated docs/update them for changed parameters. | Yuri Kunde Schlesner | 2014-11-24 | 9 | -78/+0 |
| | |||||
* | HLE: Revamp error handling throrough the HLE code | Yuri Kunde Schlesner | 2014-11-24 | 13 | -201/+187 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed. | ||||
* | Merge pull request #191 from archshift/deletexyz | bunnei | 2014-11-24 | 2 | -1/+47 |
|\ | | | | | Added DeleteFile and DeleteDirectory functions to FS:USER and the archives. | ||||
| * | Added DeleteFile and DeleteDirectory functions to FS:USER and the archives. | archshift | 2014-11-23 | 2 | -1/+47 |
| | | |||||
* | | Merge pull request #211 from linkmauve/master | bunnei | 2014-11-19 | 12 | -42/+42 |
|\ \ | | | | | | | Remove trailing spaces from the entire project | ||||
| * | | Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated | Emmanuel Gil Peyrot | 2014-11-19 | 12 | -42/+42 |
| | | | |||||
* | | | Merge pull request #208 from lioncash/statics | bunnei | 2014-11-19 | 1 | -22/+22 |
|\ \ \ | |/ / |/| | | Add static to some variables | ||||
| * | | Add static to some variables | Lioncash | 2014-11-19 | 1 | -22/+22 |
| |/ | |||||
* / | Remove extraneous semicolons | Lioncash | 2014-11-18 | 1 | -1/+1 |
|/ | |||||
* | Archive: Fixed to not destroy archive handle on close. | bunnei | 2014-11-18 | 1 | -3/+3 |
| | |||||
* | Archive: Fixed close archive before freeing. | bunnei | 2014-11-18 | 1 | -1/+1 |
| | |||||
* | FS_User: Support FileSye::Path in a more generic way. | bunnei | 2014-11-18 | 1 | -0/+11 |
| | | | | added a todo to kernel archive | ||||
* | FileSys: Updated backend code to use FileSys::Path instead of string for paths. | bunnei | 2014-11-18 | 2 | -10/+10 |
| | |||||
* | Fix two format strings. | Lioncash | 2014-11-14 | 1 | -1/+1 |
| | |||||
* | Added CreateDirectory function to service/fs.cpp, and in Archive. | archshift | 2014-11-02 | 2 | -2/+25 |
| | |||||
* | Fix some warnings | Sean | 2014-10-30 | 1 | -3/+3 |
| | |||||
* | Add `override` keyword through the code. | Yuri Kunde Schlesner | 2014-10-26 | 6 | -35/+35 |
| | | | | This was automated using `clang-modernize`. | ||||
* | FileSys: split the constructor into an Open method, in order to notify the opener something went wrong. | Emmanuel Gil Peyrot | 2014-10-06 | 1 | -0/+3 |
| | | | | Kernel: Return an invalid handle to OpenFile when it failed to open. | ||||
* | FileSys/Kernel: Implement SetSize service call for File objects. | Emmanuel Gil Peyrot | 2014-10-06 | 1 | -0/+8 |
| | |||||
* | Use the citra user path for the sdmc directory | archshift | 2014-09-21 | 1 | -2/+1 |
| | |||||
* | Kernel: Implement the Close command for Archive, File and Directory. | Emmanuel Gil Peyrot | 2014-09-17 | 2 | -0/+43 |
| | |||||
* | Kernel: Add a Directory object and a getter for it from an Archive object. | Emmanuel Gil Peyrot | 2014-09-17 | 3 | -0/+91 |
| | |||||
* | Kernel: Add a File object and a getter for it from an Archive object. | Emmanuel Gil Peyrot | 2014-09-17 | 2 | -0/+118 |
| | |||||
* | Core: Get rid of unnecessary switch statement in Kernel | Lioncash | 2014-09-15 | 1 | -41/+2 |
| | |||||
* | core: Prune redundant includes | archshift | 2014-09-09 | 3 | -6/+0 |
| | |||||
* | Threading: Fix thread starting to execute first instruction correctly. | bunnei | 2014-08-28 | 1 | -0/+5 |
| | |||||
* | Added FS functions to Archive and Archive_RomFS | archshift | 2014-08-23 | 1 | -3/+31 |
| | |||||
* | Core: Use std::array for managing kernel object space | Lioncash | 2014-08-19 | 2 | -5/+5 |
| | | | | These avoid relying on memset for clearing the arrays. | ||||
* | Core: Alter the kernel string functions to use std::string instead of const char*. | Lioncash | 2014-08-18 | 8 | -25/+22 |
| | | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names. | ||||
* | Thread: Added more descriptive comment to WaitCurrentThread. | bunnei | 2014-08-07 | 2 | -2/+10 |
| | |||||
* | AddressArbiter: Removed unnecessary HLE::Reschedule. | bunnei | 2014-08-06 | 1 | -1/+0 |
| | |||||
* | AddressArbiter: Fixed bug with break statements missing from case statements. | bunnei | 2014-08-06 | 1 | -0/+2 |
| | |||||
* | Kernel: Updated Event and Mutex to specify handle that they are blocking for. | bunnei | 2014-08-06 | 2 | -2/+2 |
| | |||||
* | Kernel: Added preliminary support for address arbiters. | bunnei | 2014-07-09 | 3 | -1/+124 |
| | | | | | | | | AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace. | ||||
* | Thread: Added functions to resume threads from address arbitration. | bunnei | 2014-07-09 | 2 | -0/+44 |
| | | | | | | Thread: Cleaned up arbitrate address functions. Thread: Cleaned up ArbitrateAllThreads function. | ||||
* | SharedMemory: Updated MapSharedMemory to use an enum for permissions. | bunnei | 2014-07-05 | 2 | -6/+27 |
| | | | | - Also added some safety checks to MapSharedMemory. | ||||
* | Kernel: Added support for shared memory objects. | bunnei | 2014-07-05 | 2 | -0/+132 |
| | | | | SharedMemory: Added optional name field for tracking known objects. | ||||
* | Archive: Added Init/Shutdown methods to reset kernel archive state. | bunnei | 2014-07-05 | 3 | -0/+19 |
| | |||||
* | FileSys: Added preliminary support for applications reading the RomFS archive. | bunnei | 2014-07-05 | 2 | -10/+105 |
| | | | | | | | | | | Archive: Fixed brace ugliness for neobrain :) FS: Commented out unused local variables to prevent warnings. ...But keeping them here for future use. archive_romfs: Removed unused #include. | ||||
* | Kernel: Added stubbed code to support creation of kernel Archive objects. | bunnei | 2014-06-27 | 3 | -0/+85 |
| | |||||
* | Kernel: Removed unnecessary "#pragma once". | bunnei | 2014-06-13 | 1 | -2/+0 |
| | |||||
* | Kernel: Added freeing of kernel objects on emulator shutdown. | bunnei | 2014-06-13 | 2 | -0/+10 |
| | |||||
* | Event: Updated several log messages to be assertions. | bunnei | 2014-06-13 | 1 | -16/+8 |
| | |||||
* | Thread: Renamed occurrences of "t" to "thread" to improve readability. | bunnei | 2014-06-13 | 1 | -48/+45 |
| | |||||
* | Thread: Cleaned up VerifyWait, fixed issue where nullptr msg could unnecessarily be logged. | bunnei | 2014-06-13 | 1 | -9/+7 |
| | |||||
* | HLE: Removed usnused EatCycles function. | bunnei | 2014-06-13 | 1 | -9/+0 |
| | |||||
* | Thread: Moved position of * in arguments. | bunnei | 2014-06-13 | 1 | -2/+2 |
| | |||||
* | Thread: Updated VerifyWait to be more readable (but functionally the same). | bunnei | 2014-06-13 | 1 | -4/+3 |
| | |||||
* | HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) | bunnei | 2014-06-13 | 3 | -9/+9 |
| | |||||
* | Kernel: Updated various kernel function "name" arguments to be const references. | bunnei | 2014-06-13 | 4 | -6/+6 |
| | |||||
* | HLE: Updated various handle debug assertions to be more clear. | bunnei | 2014-06-13 | 2 | -3/+3 |
| | |||||
* | Mutex: Moved ReleaseMutex iterator declaration to be inside while loop. | bunnei | 2014-06-13 | 1 | -2/+1 |
| | |||||
* | Kernel: Updated several member functions to be const | bunnei | 2014-06-13 | 4 | -11/+11 |
| | |||||
* | Thread: Fixed bug with ResetThread where cpu_registers[15] was being incorrectly set | bunnei | 2014-06-13 | 1 | -1/+1 |
| | |||||
* | Kernel: Made SyncRequest not pure virtual, with a default implementation of error (as this is not required for all kernel objects) | bunnei | 2014-06-13 | 3 | -23/+4 |
| | |||||
* | Kernel: Added real support for thread and event blocking | bunnei | 2014-06-13 | 5 | -48/+165 |
| | | | | | | | | | | | | | - SVC: Added ExitThread support - SVC: Added SignalEvent support - Thread: Added WAITTYPE_EVENT for waiting threads for event signals - Thread: Added support for blocking on other threads to finish (e.g. Thread::Join) - Thread: Added debug function for printing current threads ready for execution - Thread: Removed hack/broken thread ready state code from Kernel::Reschedule - Mutex: Moved WaitCurrentThread from SVC to Mutex::WaitSynchronization - Event: Added support for blocking threads on event signalling Kernel: Added missing algorithm #include for use of std::find on non-Windows platforms. | ||||
* | kernel: changed current default thread priority back to 0x30 - I think this is more correct | bunnei | 2014-06-05 | 1 | -1/+1 |
| | |||||
* | svc: added optional name field to Event and Mutex (used for debugging) | bunnei | 2014-06-03 | 4 | -8/+21 |
| | |||||
* | kernel: moved position of * for GetTypeName and GetName | bunnei | 2014-06-03 | 1 | -2/+2 |
| | |||||
* | svc: added GetThreadPriority and SetThreadPriority, added (incomplete) DuplicateHandle support | bunnei | 2014-06-02 | 2 | -0/+51 |
| | |||||
* | kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedule | bunnei | 2014-06-02 | 3 | -4/+6 |
| | |||||
* | thread: updated Reschedule to sit at a synchronization barrier when no other threads are ready for execution | bunnei | 2014-06-01 | 1 | -0/+18 |
| | |||||
* | event: added a hackish ability to set an event as "locked" to its current state, cleaned up some comments | bunnei | 2014-06-01 | 2 | -4/+32 |
| | |||||
* | mutex: fixed typo in ReleaseMutex | bunnei | 2014-05-30 | 1 | -1/+3 |
| | |||||
* | event: added support for ClearEvent, fixed a bug with CreateEvent, fixed some comments | bunnei | 2014-05-30 | 2 | -9/+14 |
| | |||||
* | mutex: added preliminary SyncRequest/WaitSynchronization, added some comments/assertions | bunnei | 2014-05-28 | 1 | -0/+6 |
| | |||||
* | event: fixed typos and updated CMakeLists | bunnei | 2014-05-28 | 1 | -1/+1 |
| | |||||
* | event: added SetEventLocked method to change status an events lock | bunnei | 2014-05-28 | 2 | -0/+18 |
| | |||||
* | kernel: added event module to support creation of CTR "Event" objects | bunnei | 2014-05-28 | 2 | -0/+119 |
| | |||||
* | mutex: removed docstring comment that is no longer relevant | bunnei | 2014-05-27 | 1 | -1/+0 |
| | |||||
* | mutex: added additional docstrings | bunnei | 2014-05-27 | 1 | -0/+2 |
| | |||||
* | kernel: added WaitSynchronization method to Kernel::Object | bunnei | 2014-05-27 | 3 | -0/+29 |
| | |||||
* | kernel: updated SyncRequest to take boolean thread wait result as a parameter | bunnei | 2014-05-27 | 3 | -5/+20 |
| | |||||
* | kernel: added enum for known CurrentThread and CurrentProcess handles | bunnei | 2014-05-27 | 1 | -0/+5 |
| | |||||
* | kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequest | bunnei | 2014-05-27 | 3 | -0/+11 |
| | |||||
* | thread: renamed "WaitCurThread" to "WaitCurrentThread", removed unused "reason" argument | bunnei | 2014-05-23 | 2 | -4/+4 |
| | |||||
* | thread: removed unused SwitchContext/Reschedule reason field, added missing arg parameter to SVC CreateThread | bunnei | 2014-05-23 | 2 | -4/+4 |
| | |||||
* | kernel: refactored function naming to remove "__" prefix | bunnei | 2014-05-23 | 5 | -62/+72 |
| | |||||
* | thread: moved ThreadStatus/WaitType to header, added support for arg on CreateThread, added correct CPSR reset | bunnei | 2014-05-23 | 2 | -35/+40 |
| | |||||
* | thread: fixed bug where result of __NextThread was not being properly checked when NULL | bunnei | 2014-05-22 | 1 | -1/+1 |
| | |||||
* | mutex: refactored the interface to code to return a Mutex* handle | bunnei | 2014-05-21 | 2 | -3/+13 |
| | |||||
* | mutex: initial commit of HLE module | bunnei | 2014-05-21 | 2 | -0/+148 |
| | |||||
* | kernel: fixed include, in general include "common.h" not "common_types.h" | bunnei | 2014-05-21 | 1 | -1/+1 |
| | |||||
* | thread: added correct lowest thread priority, added a thread priority check, and added some comments | bunnei | 2014-05-21 | 2 | -6/+10 |
| | |||||
* | thread: exposed ResumeThreadFromWait function for use in other kernel modules | bunnei | 2014-05-21 | 2 | -8/+11 |
| | |||||
* | thread: moved threading calls to the Kernel namespace | bunnei | 2014-05-21 | 3 | -101/+115 |
| | |||||
* | ARM_Interface: added SaveContext and LoadContext functions for HLE thread switching | bunnei | 2014-05-21 | 1 | -36/+2 |
| | |||||
* | renamed "syscall" module to "svc" (more accurate naming) | bunnei | 2014-05-21 | 1 | -1/+1 |
| | |||||
* | thread: whitespace change - fixed * and & placement | bunnei | 2014-05-21 | 2 | -27/+27 |
| | |||||
* | - created a Kernel namespace | bunnei | 2014-05-21 | 4 | -67/+79 |
| | | | | | - cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles | ||||
* | thread: added declaration for __KernelReschedule to be used by syscall module | bunnei | 2014-05-20 | 1 | -0/+3 |
| | |||||
* | - updated service(s) to be KernelObject's | bunnei | 2014-05-19 | 1 | -4/+5 |
| | | | | - various cleanups | ||||
* | - moved Handle/Result definitions to kernel.h | bunnei | 2014-05-19 | 2 | -3/+2 |
| | | | | - added ResetType enum | ||||
* | changed a comment | bunnei | 2014-05-17 | 2 | -2/+2 |
| | |||||
* | - added enum ThreadProcessorId | bunnei | 2014-05-17 | 2 | -53/+107 |
| | | | | | - reorganized some kernel thread functions - added placeholder __KernelWaitThread_Synchronization function | ||||
* | - replaced KERNELOBJECT_MAX_NAME_LENGTH with KERNEL_MAX_NAME_LENGTH | bunnei | 2014-05-17 | 3 | -8/+12 |
| | | | | - added KERNEL_DEFAULT_STACK_SIZE definition (0x4000) | ||||
* | completely gutted/refactored threading code to be simpler | bunnei | 2014-05-16 | 2 | -658/+230 |
| | |||||
* | changed "UID" to "Handle" to be a little more consistent with CTR naming | bunnei | 2014-05-16 | 2 | -18/+21 |
| | |||||
* | - added helper function for __KernelCreateThread | bunnei | 2014-05-15 | 2 | -4/+76 |
| | | | | | - added __KernelSwitchToThread for enabling a thread - added __KernelRotateThreadReadyQueue | ||||
* | changed primary thread priority to 0x30 - this is typical, not 0x31 | bunnei | 2014-05-15 | 1 | -1/+2 |
| | |||||
* | fixed thread reset to not set stack address | bunnei | 2014-05-14 | 1 | -1/+1 |
| | |||||
* | various cleanups / remove unused code | bunnei | 2014-05-14 | 2 | -65/+29 |
| | |||||
* | added 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 point | bunnei | 2014-05-14 | 2 | -70/+543 |
| | |||||
* | - added __KernelLoadExec function | bunnei | 2014-05-14 | 2 | -13/+35 |
| | | | | - fixed some logging | ||||
* | added initial kernel/thread modules | bunnei | 2014-05-10 | 4 | -0/+527 |