Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Kernel: Move HandleTable to a separate file | Yuri Kunde Schlesner | 2017-05-30 | 1 | -0/+2 |
| | |||||
* | Kernel: Move WaitObject to a separate file | Yuri Kunde Schlesner | 2017-05-30 | 1 | -0/+1 |
| | | | | | Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header. | ||||
* | Kernel: Removed HandleTable::GetWaitObject | Yuri Kunde Schlesner | 2017-05-30 | 1 | -2/+2 |
| | | | | | This isn't necessary anymore since plain Get works correctly for WaitObjects. | ||||
* | Kernel: Centralize error definitions in errors.h | Yuri Kunde Schlesner | 2017-05-25 | 1 | -65/+31 |
| | |||||
* | Remove ability to load symbol maps | Yuri Kunde Schlesner | 2017-05-08 | 1 | -8/+2 |
| | | | | | This was now mostly unused except by thread creation, which used a symbol of the entrypoint, if available, to name the thread. | ||||
* | Fix OutputDebugString syscall | Michael Theall | 2017-04-01 | 1 | -2/+2 |
| | |||||
* | Refined thread launch on syscore error messages | Fernando Sahmkow | 2017-03-09 | 1 | -5/+15 |
| | |||||
* | Timers: Return an error when calling SetTimer with negative timeouts. | Subv | 2017-02-22 | 1 | -0/+5 |
| | |||||
* | Threads: Check the process' resource limit for the max allowed priority when creating a thread and remove the priority clamping code. | Subv | 2017-01-11 | 1 | -5/+7 |
| | |||||
* | Thread: Added priority range checking to svcSetThreadPriority and removed priority clamping code from Thread::SetPriority. | Subv | 2017-01-11 | 1 | -0/+14 |
| | |||||
* | Merge pull request #2410 from Subv/sleepthread | bunnei | 2017-01-07 | 1 | -0/+5 |
|\ | | | | | Don't yield execution in SleepThread(0) if there are no available threads to run | ||||
| * | Kernel: Don't attempt to yield execution in SleepThread(0) if there are no available threads to run. | Subv | 2017-01-06 | 1 | -0/+5 |
| | | | | | | | | With this we avoid an useless temporary deschedule of the current thread. | ||||
* | | Kernel: Fix SharedMemory objects always returning error when addr = 0 (#2404) | Hyper | 2017-01-06 | 1 | -1/+5 |
|/ | | | Closes #2400 | ||||
* | Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on. | Subv | 2017-01-05 | 1 | -11/+3 |
| | |||||
* | Kernel: Use different thread statuses when a thread calls WaitSynchronization1 and WaitSynchronizationN with wait_all = true. | Subv | 2017-01-04 | 1 | -3/+3 |
| | | | | | | | | This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses: THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false. THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true. | ||||
* | Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexes | Subv | 2017-01-04 | 1 | -0/+6 |
| | |||||
* | Kernel/Mutex: Update a mutex priority when a thread stops waiting on it. | Subv | 2017-01-04 | 1 | -2/+3 |
| | |||||
* | Kernel/Mutex: Implemented priority inheritance. | Subv | 2017-01-04 | 1 | -9/+0 |
| | | | | | | | The implementation is based on reverse engineering of the 3DS's kernel. A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes. When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes. | ||||
* | Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter. | Subv | 2017-01-04 | 1 | -6/+6 |
| | | | | This will be useful when implementing mutex priority inheritance. | ||||
* | Kernel/Synch: Do not attempt a reschedule on every syscall. | Subv | 2017-01-04 | 1 | -2/+17 |
| | | | | Not all syscalls should cause reschedules, this commit attempts to remedy that, however, it still does not cover all cases. | ||||
* | core: Replace "AppCore" nomenclature with just "CPU". | bunnei | 2016-12-22 | 1 | -7/+6 |
| | |||||
* | Address clang-format issues. | bunnei | 2016-12-22 | 1 | -9/+10 |
| | |||||
* | core: Remove HLE module, consolidate code & various cleanups. | bunnei | 2016-12-22 | 1 | -35/+35 |
| | |||||
* | core: Consolidate core and system state, remove system module & cleanups. | bunnei | 2016-12-22 | 1 | -6/+6 |
| | |||||
* | Thread: remove the thread from the thread list when exiting | wwylele | 2016-12-17 | 1 | -1/+1 |
| | |||||
* | Merge pull request #2260 from Subv/scheduling | bunnei | 2016-12-16 | 1 | -80/+107 |
|\ | | | | | Threading: Reworked the way our scheduler works. | ||||
| * | Fixed the codestyle to match our clang-format rules. | Subv | 2016-12-14 | 1 | -19/+28 |
| | | |||||
| * | Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout. | Subv | 2016-12-10 | 1 | -1/+1 |
| | | |||||
| * | WaitSynch: Removed unused variables and reduced SharedPtr copies. | Subv | 2016-12-09 | 1 | -60/+45 |
| | | | | | | | | | | | | 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. | ||||
| * | Threading: Added some utility functions and const correctness. | Subv | 2016-12-04 | 1 | -5/+13 |
| | | |||||
| * | Threading: Reworked the way our scheduler works. | Subv | 2016-12-04 | 1 | -78/+103 |
| | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Fixed the codestyle to match our clang-format rules. | Subv | 2016-12-14 | 1 | -2/+4 |
| | | |||||
* | | Use std::move where appropriate. | Subv | 2016-12-08 | 1 | -5/+1 |
| | | |||||
* | | Return an error code when connecting to a saturated port. | Subv | 2016-12-05 | 1 | -1/+2 |
| | | | | | | | | The error code was taken from the 3DS kernel. | ||||
* | | KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it. | Subv | 2016-12-05 | 1 | -13/+5 |
| | | |||||
* | | Threads do not wait for the server endpoint to call AcceptSession before returning from a ConnectToPort or GetServiceHandle call. | Subv | 2016-12-01 | 1 | -2/+3 |
| | | |||||
* | | A bit of a redesign. | Subv | 2016-12-01 | 1 | -2/+9 |
| | | | | | | | | | | | | | | Sessions and Ports are now detached from each other. HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class. The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested. File::OpenLinkFile now creates a new session pair and binds the File instance to it. | ||||
* | | Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication. | Subv | 2016-12-01 | 1 | -3/+15 |
|/ | | | | | | | All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately. | ||||
* | name objects | wwylele | 2016-09-22 | 1 | -0/+4 |
| | |||||
* | Remove empty newlines in #include blocks. | Emmanuel Gil Peyrot | 2016-09-21 | 1 | -5/+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 Peyrot | 2016-09-18 | 1 | -234/+278 |
| | |||||
* | Kernel/SVC: Implemented svcCreatePort. | Subv | 2016-06-11 | 1 | -1/+20 |
| | |||||
* | SVC::WaitSynchronizationN: Reschedule at the end | wwylele | 2016-05-21 | 1 | -2/+3 |
| | |||||
* | Set fpscr for new threads | Jannik Vogel | 2016-05-17 | 1 | -0/+3 |
| | |||||
* | Kernel: Implemented shared memory permissions. | Subv | 2016-05-13 | 1 | -0/+2 |
| | |||||
* | Kernel/SharedMemory: Properly implemented shared memory support. | Subv | 2016-05-13 | 1 | -12/+35 |
| | | | | | | | Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object. Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock. Removed the APT Shared Font hack as it is no longer needed. | ||||
* | Merge pull request #1766 from Subv/log_cpu | bunnei | 2016-05-08 | 1 | -0/+5 |
|\ | | | | | Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1) | ||||
| * | Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1). | Subv | 2016-05-07 | 1 | -0/+5 |
| | | | | | | | | We do not currently implement any cores other than the AppCore (Core 0). | ||||
* | | Merge pull request #1647 from mailwl/acu-closeasync | bunnei | 2016-04-30 | 1 | -0/+4 |
|\ \ | | | | | | | ac:u: stub CloseAsync; align memory size in svc:GetProcessInfo(type=2) | ||||
| * | | ac:u: stub CloseAsync; check memory size aling in svc:GetProcessInfo(type=2) | mailwl | 2016-04-21 | 1 | -0/+4 |
| |/ | |||||
* / | Common: Remove section measurement from profiler (#1731) | Yuri Kunde Schlesner | 2016-04-29 | 1 | -4/+0 |
|/ | | | | This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI. | ||||
* | svc: Move ResetType enum to the kernel event header | Lioncash | 2016-03-13 | 1 | -2/+2 |
| | |||||
* | ThreadProcessorId_All on SVC::CreateThread | Kloen | 2016-03-01 | 1 | -0/+1 |
| | |||||
* | HLE/SVC: Implement UnmapMemoryBlock. | Subv | 2016-01-14 | 1 | -5/+27 |
| | | | | This implementation will need to be (almost completely) changed when we implement multiprocess support. | ||||
* | svc: Remove superfluous printf argument | Lioncash | 2015-12-25 | 1 | -1/+1 |
| | |||||
* | svc: Fix compilation with LOG_TRACE enabled | Lioncash | 2015-12-13 | 1 | -1/+1 |
| | |||||
* | Kernel: Implement svcGetSystemInfo | Yuri Kunde Schlesner | 2015-12-01 | 1 | -1/+46 |
| | | | | | This makes smealum/ctrulib@b96dd51d3349961189d4ab1bc2a5c45deff21c09 work with Citra. | ||||
* | SVC: Advance time when calling GetSystemTick to escape busy-wait loops | Yuri Kunde Schlesner | 2015-08-30 | 1 | -1/+4 |
| | | | | | | | | Cubic Ninja waited for the frame to end by spinning on a loop calling GetSystemTick while doing nothing else. Since GetSystemTick doesn't cause a reschedule (which advances time), this meant that very little emulated time would pass inside that loop, causing the game to spend most of the frame burning away CPU. | ||||
* | Integrate the MicroProfile profiling library | Yuri Kunde Schlesner | 2015-08-25 | 1 | -0/+4 |
| | | | | | This brings goodies such as a configurable user interface and multi-threaded timeline view. | ||||
* | Kernel: Implement svcGetProcessInfo in a basic way | Yuri Kunde Schlesner | 2015-08-16 | 1 | -1/+47 |
| | | | | | This also adds some basic memory usage accounting. These two types are used by Super Smash Bros. during startup. | ||||
* | Kernel: Add more infrastructure to support different memory layouts | Yuri Kunde Schlesner | 2015-08-16 | 1 | -1/+1 |
| | | | | | | 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. | ||||
* | Move core/mem_map.{cpp,h} => core/hle/kernel/memory.{cpp,h} | Yuri Kunde Schlesner | 2015-08-16 | 1 | -1/+1 |
| | |||||
* | Kernel: Properly implement ControlMemory FREE and COMMIT | Yuri Kunde Schlesner | 2015-08-16 | 1 | -13/+95 |
| | |||||
* | Merge pull request #888 from zawata/Warning-Fixes-2 | Yuri Kunde Schlesner | 2015-07-25 | 1 | -2/+2 |
|\ | | | | | Core\HLE : Fix Warning | ||||
| * | Core\HLE : Fix Warning | zawata | 2015-07-17 | 1 | -2/+2 |
| | | | | | | | | "signed/unsigned mismatch" | ||||
* | | dyncom: Pass SVC immediates directly. | Lioncash | 2015-07-21 | 1 | -4/+3 |
| | | | | | | | | Previously it would just re-read the already decoded instruction and extract the immediate value. | ||||
* | | Kernel/SVC: Implemented svcQueryProcessMemory | Subv | 2015-07-17 | 1 | -6/+16 |
| | | |||||
* | | Kernel/SVC: Implemented svcQueryMemory. | Subv | 2015-07-17 | 1 | -2/+14 |
|/ | |||||
* | kernel: Fix svcWaitSynch to always acquire requested wait objects. | bunnei | 2015-06-17 | 1 | -9/+17 |
| | |||||
* | Remove every trailing whitespace from the project (but externals). | Emmanuel Gil Peyrot | 2015-05-29 | 1 | -2/+2 |
| | |||||
* | Core/SVC: Map the shared memory created in CreateMemoryBlock to the specified address. | Subv | 2015-05-25 | 1 | -0/+2 |
| | | | | This SharedMemory can be passed to service functions (Which should map the memory into their own address space). | ||||
* | Kernel: Move reschedules from SVCs to actual mechanisms that reschedule. | bunnei | 2015-05-21 | 1 | -20/+2 |
| | |||||
* | Implement svcBreak | archshift | 2015-05-17 | 1 | -1/+13 |
| | |||||
* | Core/ResourceLimits: Implemented the basic structure of ResourceLimits. | Subv | 2015-05-15 | 1 | -11/+38 |
| | | | | | | 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. | ||||
* | Memmap: Re-organize memory function in two files | Yuri Kunde Schlesner | 2015-05-15 | 1 | -1/+1 |
| | | | | | | | memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory. | ||||
* | fixup! | Subv | 2015-05-12 | 1 | -9/+9 |
| | |||||
* | Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread | Subv | 2015-05-11 | 1 | -2/+31 |
| | |||||
* | Kernel: Capture SharedMemory attributes at creation, not when mapping | Yuri Kunde Schlesner | 2015-05-11 | 1 | -1/+3 |
| | |||||
* | Fix printf format warning | Yuri Kunde Schlesner | 2015-05-07 | 1 | -1/+1 |
| | |||||
* | Common: Remove common.h | Yuri Kunde Schlesner | 2015-05-07 | 1 | -0/+1 |
| | |||||
* | HLE: Clean up SVC dispatch mechanism | Yuri Kunde Schlesner | 2015-05-06 | 1 | -3/+34 |
| | |||||
* | SVC: Assert on unsupported CreateThread processor ID. | bunnei | 2015-04-10 | 1 | -3/+9 |
| | |||||
* | SVC: Update various SVCs to cause a reschedule. | bunnei | 2015-04-10 | 1 | -2/+22 |
| | | | | - CreateMutex/ReleaseMutex/ReleaseSemaphore/SetTimer/CancelTimer/ArbitrateAddress | ||||
* | Thread: Implement priority boost for starved threads. | bunnei | 2015-04-10 | 1 | -6/+16 |
| | | | | | | SVC: Return correct error code on invalid CreateThread processor ID. SVC: Assert when creating a thread with an invalid userland priority. | ||||
* | SVC: Reschedule on svcCreateThread. | bunnei | 2015-04-10 | 1 | -0/+2 |
| | |||||
* | arm_interface: Get rid of GetTicks. | Lioncash | 2015-03-16 | 1 | -2/+3 |
| | | | | Removes a TODO. | ||||
* | Asserts: break/crash program, fit to style guide; log.h->assert.h | archshift | 2015-02-11 | 1 | -1/+1 |
| | | | | | | | 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. 1 | Kevin Hartman | 2015-02-10 | 1 | -5/+9 |
| | | | | | | | | | | | | | * 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. | ||||
* | WaitSynch: Always reschedule (verified behavior on hw). | bunnei | 2015-02-10 | 1 | -4/+4 |
| | |||||
* | Kernel: Stop creating useless Handles during object creation | Yuri Kunde Schlesner | 2015-02-02 | 1 | -7/+11 |
| | | | | | They're finally unnecessary, and will stop cluttering the application's handle table. | ||||
* | SVC: Enable CloseHandle, clean up DuplicateHandle | Yuri Kunde Schlesner | 2015-02-02 | 1 | -9/+5 |
| | |||||
* | Thread: Modernize two functions that slipped through previous rebases | Yuri Kunde Schlesner | 2015-02-02 | 1 | -3/+3 |
| | |||||
* | Make Port/Service registration and querying more HW-accurate | Yuri Kunde Schlesner | 2015-02-02 | 1 | -4/+16 |
| | |||||
* | SVC: Use CASCADE_RESULT in SVC handlers | Yuri Kunde Schlesner | 2015-01-30 | 1 | -73/+32 |
| | |||||
* | Remove result.h InvalidHandle | Yuri Kunde Schlesner | 2015-01-30 | 1 | -15/+16 |
| | | | | | It was only being used in two places, where it was replaced by a local constant. | ||||
* | SVC: Change return type of handlers to ResultCode | Yuri Kunde Schlesner | 2015-01-30 | 1 | -90/+90 |
| | |||||
* | Kernel: Convert Event to not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -11/+29 |
| | |||||
* | Kernel: Convert Timer to (mostly) not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -7/+40 |
| | |||||
* | Kernel: Convert Mutex to not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -5/+19 |
| | |||||
* | Kernel: Convert AddressArbiter to not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -6/+24 |
| | |||||
* | Kernel: Convert Semaphore to not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -6/+27 |
| | |||||
* | Kernel: Convert SharedMemory to not use Handles | Yuri Kunde Schlesner | 2015-01-30 | 1 | -15/+29 |
| | |||||
* | Merge pull request #412 from purpasmart96/svc_table_cleanup | bunnei | 2015-01-28 | 1 | -7/+7 |
|\ | | | | | SVC: Update the SVC function table | ||||
| * | SVC: Update the SVC function table | purpasmart96 | 2015-01-27 | 1 | -7/+7 |
| | | |||||
* | | WaitSynchronization: Added a result code for invalid result, fixed bug. | bunnei | 2015-01-22 | 1 | -3/+9 |
| | | |||||
* | | Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup. | bunnei | 2015-01-22 | 1 | -3/+3 |
| | | |||||
* | | Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void. | bunnei | 2015-01-22 | 1 | -7/+3 |
| | | |||||
* | | WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual. | bunnei | 2015-01-22 | 1 | -2/+2 |
| | | |||||
* | | Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs. | bunnei | 2015-01-22 | 1 | -0/+1 |
| | | |||||
* | | Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely. | bunnei | 2015-01-22 | 1 | -2/+2 |
| | | |||||
* | | SVC: Removed a Sleep that made no sense | bunnei | 2015-01-22 | 1 | -6/+1 |
| | | | | | | | | | | - Would deadlock the calling thread - Code would never get hit anyways | ||||
* | | AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense. | bunnei | 2015-01-22 | 1 | -3/+3 |
| | | |||||
* | | Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks. | bunnei | 2015-01-22 | 1 | -10/+20 |
| | | |||||
* | | WaitSynchronizationN: Improved comments | bunnei | 2015-01-22 | 1 | -7/+12 |
| | | |||||
* | | WaitSynchronizationN: Refactor to fix several bugs | bunnei | 2015-01-22 | 1 | -25/+27 |
| | | | | | | | | | | | | - Separate wait checking from waiting the current thread - Resume thread when wait_all=true only if all objects are available at once - Set output to correct wait object index when there are duplicate handles | ||||
* | | Kernel: Separate WaitSynchronization into Wait and Acquire methods. | bunnei | 2015-01-22 | 1 | -4/+5 |
| | | |||||
* | | WaitSynchronizationN: Handle case where handles=nullptr. | bunnei | 2015-01-22 | 1 | -0/+4 |
| | | |||||
* | | WaitSynchronizationN: Handle case where handle_count is invalid. | bunnei | 2015-01-22 | 1 | -3/+7 |
| | | |||||
* | | WaitSynchronizationN: Handle case where handle_count=0. | bunnei | 2015-01-22 | 1 | -19/+29 |
| | | |||||
* | | WaitSynchronizationN: Implement return values | bunnei | 2015-01-22 | 1 | -27/+50 |
| | | |||||
* | | AddrArbiter: Implement arbitration types 3 and 4. | Subv | 2015-01-13 | 1 | -1/+1 |
|/ | |||||
* | SVC: Wake up the thread after the delay in WaitSync1 | Subv | 2015-01-11 | 1 | -3/+2 |
| | |||||
* | Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance. | archshift | 2015-01-10 | 1 | -1/+0 |
| | |||||
* | Kernel: Start using boost::intrusive_ptr for lifetime management | Yuri Kunde Schlesner | 2015-01-09 | 1 | -13/+18 |
| | |||||
* | Merge pull request #444 from yuriks/handle-reform2 | bunnei | 2015-01-09 | 1 | -20/+32 |
|\ | | | | | Kernel Lifetime Reform Pt. 2 | ||||
| * | Thread: Reduce use of Handles and move some funcs to inside the class. | Yuri Kunde Schlesner | 2015-01-09 | 1 | -20/+31 |
| | | |||||
| * | Move ThreadContext to core/core.h and deal with the fallout | Yuri Kunde Schlesner | 2015-01-09 | 1 | -0/+1 |
| | | |||||
* | | Merge pull request #436 from kevinhartman/system-core | bunnei | 2015-01-09 | 1 | -0/+5 |
|\ \ | |/ |/| | Warn if a new thread is intended to be run on the system CPU core | ||||
| * | Warn if a new thread is intended to be run on the system CPU core until we implement correct scheduling for such a thread. | Kevin Hartman | 2015-01-07 | 1 | -0/+5 |
| | | |||||
* | | Merge pull request #255 from Subv/cbranch_3 | bunnei | 2015-01-09 | 1 | -4/+32 |
|\ \ | | | | | | | Implemented timers | ||||
| * | | SVC: Implemented the Timer service calls. | Subv | 2015-01-09 | 1 | -4/+32 |
| |/ | |||||
* / | SVC: Fixed SleepThread. | Subv | 2015-01-09 | 1 | -0/+4 |
|/ | | | | It will now properly wait the specified number of nanoseconds and then wake up the thread. | ||||
* | SOC_U: Preliminary implementation of sockets. | Subv | 2014-12-31 | 1 | -1/+13 |
| | | | | | | | | | | | | | Stubbed CreateMemoryBlock Using Berkeley sockets, and Winsock2.2 on Windows. So far ftpony creates the socket and accepts incoming connections SOC_U: Renamed functions to maintain consistency Also prevents possible scope errors / conflicts with the actual Berkeley socket functions SOCU: Close all the opened sockets when cleaning up SOCU | ||||
* | Kernel: New handle manager | Yuri Kunde Schlesner | 2014-12-28 | 1 | -19/+9 |
| | | | | | | | | | | | 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 HandleTable | Yuri Kunde Schlesner | 2014-12-28 | 1 | -5/+5 |
| | |||||
* | Merge pull request #291 from purpasmart96/license | bunnei | 2014-12-21 | 1 | -1/+1 |
|\ | | | | | License change | ||||
| * | License change | purpasmart96 | 2014-12-21 | 1 | -1/+1 |
| | | |||||
* | | Thread: Wait current thread on svc_SleepThread | bunnei | 2014-12-21 | 1 | -1/+2 |
|/ | | | | | | - Removed unused VBLANK sleep mode - Added error log for bad context switch - Renamed VerifyWait to CheckWaitType to be more clear | ||||
* | Merge pull request #185 from purpasmart96/mem_perm | bunnei | 2014-12-18 | 1 | -0/+4 |
|\ | | | | | Kernel: Add missing permissions | ||||
| * | Kernel:Add missing permissions in shared memory & svc | purpasmart96 | 2014-11-19 | 1 | -0/+4 |
| | | |||||
* | | Remove SyncRequest from K::Object and create a new K::Session type | Yuri Kunde Schlesner | 2014-12-15 | 1 | -7/+4 |
| | | | | | | | | | | | | | | 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/Semaphores: Fixed build | Subv | 2014-12-13 | 1 | -2/+2 |
| | | |||||
* | | SVC: Implemented ReleaseSemaphore. | Subv | 2014-12-13 | 1 | -3/+10 |
| | | | | | | | | 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 | 1 | -1/+10 |
| | | | | | | | | | | ToDo: Implement svcReleaseSemaphore * Some testing against hardware needed | ||||
* | | Convert old logging calls to new logging macros | Yuri Kunde Schlesner | 2014-12-13 | 1 | -27/+27 |
| | | |||||
* | | MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP. | bunnei | 2014-12-12 | 1 | -1/+1 |
| | | | | | | | | - Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU). | ||||
* | | SVC: Implemented GetThreadId. | Subv | 2014-12-04 | 1 | -4/+5 |
| | | | | | | | | 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. | ||||
* | | SVC: Add debug log to ArbitrateAddress. | bunnei | 2014-11-26 | 1 | -0/+2 |
| | | |||||
* | | SVC: SleepThread should yield to the next ready thread. | bunnei | 2014-11-26 | 1 | -0/+3 |
| | | |||||
* | | HLE: Revamp error handling throrough the HLE code | Yuri Kunde Schlesner | 2014-11-24 | 1 | -31/+37 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated | Emmanuel Gil Peyrot | 2014-11-19 | 1 | -14/+14 |
| | | |||||
* | | core: Mark some hle functions as static | Lioncash | 2014-11-18 | 1 | -26/+26 |
|/ | | | | These functions are not referred to by their linkage name outside of the translation unit, so they can be marked as static. | ||||
* | Fix some warnings | Sean | 2014-10-30 | 1 | -3/+3 |
| | |||||
* | Merge pull request #99 from archshift/ext-check | bunnei | 2014-09-11 | 1 | -1/+1 |
|\ | | | | | loader.cpp: improved file extension checking, made Upper/LowerStr useful, moved string_util into Common namespace | ||||
| * | Added string_util to common, small changes in loader.cpp | archshift | 2014-09-09 | 1 | -1/+1 |
| | | |||||
* | | core: Prune redundant includes | archshift | 2014-09-09 | 1 | -3/+0 |
|/ | |||||
* | Merge pull request #55 from lioncash/string | bunnei | 2014-08-19 | 1 | -5/+5 |
|\ | | | | | Core: Alter the kernel string functions to use std::string instead of const char*. | ||||
| * | Core: Alter the kernel string functions to use std::string instead of const char*. | Lioncash | 2014-08-18 | 1 | -5/+5 |
| | | | | | | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names. | ||||
* | | SVC: Added support for svc_GetSystemTick. | bunnei | 2014-08-19 | 1 | -1/+6 |
|/ | | | | Changed HLE function return methods to be static inline functions. | ||||
* | Core: Fix a formatting error in svc.cpp | Lioncash | 2014-08-17 | 1 | -3/+2 |
| | | | | | entry_point would not be added to the string. Also used StringFromFormat so that the buffer is unnecessary. | ||||
* | SVC: Fixed typo with MapMemoryBlock DEBUG_LOG call. | bunnei | 2014-08-08 | 1 | -1/+1 |
| | |||||
* | SVC: Removed ArbitrateAddress log message that spams to much. | bunnei | 2014-08-06 | 1 | -2/+0 |
| | |||||
* | Kernel: Added preliminary support for address arbiters. | bunnei | 2014-07-09 | 1 | -8/+10 |
| | | | | | | | | AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace. | ||||
* | SharedMemory: Updated MapSharedMemory to use an enum for permissions. | bunnei | 2014-07-05 | 1 | -10/+9 |
| | | | | - Also added some safety checks to MapSharedMemory. | ||||
* | GSP: Fixed to use real shared memory object, various cleanups. | bunnei | 2014-07-05 | 1 | -5/+6 |
| | | | | | | | | - Previously, used a hard-coded shared memory handle of 0x10002000 (as used by libctru homebrew) GSP: Added name for shared memory. GSP: Cleaned up assertion message. | ||||
* | SVC: Renamed all function wrapper templates to Wrap, moved to HLE namespace. | bunnei | 2014-06-13 | 1 | -126/+126 |
| | |||||
* | SVC: Cleaned up function wrappers to pass in correct argument types. | bunnei | 2014-06-13 | 1 | -148/+138 |
| | |||||
* | SVC: Moved declaration of "wait" variable in SendSyncRequest for improved readability. | bunnei | 2014-06-13 | 1 | -1/+1 |
| | |||||
* | HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) | bunnei | 2014-06-13 | 1 | -107/+107 |
| | |||||
* | HLE: Updated various handle debug assertions to be more clear. | bunnei | 2014-06-13 | 1 | -6/+6 |
| | |||||
* | Kernel: Added real support for thread and event blocking | bunnei | 2014-06-13 | 1 | -28/+31 |
| | | | | | | | | | | | | | - 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. | ||||
* | svc: updated WaitSynchronizationN to properly use first pointer argument | bunnei | 2014-06-02 | 1 | -3/+3 |
| | |||||
* | svc: changed DuplicateHandle log message from "error" to "debug" | bunnei | 2014-06-02 | 1 | -1/+1 |
| | |||||
* | svc: added GetThreadPriority and SetThreadPriority, added (incomplete) DuplicateHandle support | bunnei | 2014-06-02 | 1 | -3/+26 |
| | |||||
* | kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedule | bunnei | 2014-06-02 | 1 | -2/+7 |
| | |||||
* | svc: cleaned up function_wrappers, updated various SVCs to make use of pointer arguments | bunnei | 2014-06-02 | 1 | -16/+18 |
| | |||||
* | svc: updated waitSychronization to not overwrite handle on return, added stub for SleepThread (does nothing) | bunnei | 2014-06-01 | 1 | -2/+21 |
| | |||||
* | hle: cleaned up log messages | bunnei | 2014-05-30 | 1 | -27/+28 |
| | |||||
* | svc: updated OutputDebugString to use OS_LOG | bunnei | 2014-05-30 | 1 | -1/+1 |
| | |||||
* | svc: changed unimplemented SVC log messages from "debug" messages to "error" messages | bunnei | 2014-05-30 | 1 | -8/+8 |
| | |||||
* | svc: added svcClearEvent, stubbed function for svcArbitrateAddress, and various fixes | bunnei | 2014-05-30 | 1 | -22/+32 |
| | | | | | | - force kernel reschedule after svcWaitSynchronization - fixed some bugs with passing in pointer arguments - cleaned up some comments and log messages | ||||
* | svc: implemented WaitSynchronization1, WaitSynchronizationN, and CreateEvent | bunnei | 2014-05-28 | 1 | -14/+54 |
| | |||||
* | kernel: updated SyncRequest to take boolean thread wait result as a parameter | bunnei | 2014-05-27 | 1 | -2/+9 |
| | |||||
* | svc: added some assertions | bunnei | 2014-05-27 | 1 | -6/+4 |
| | |||||
* | svc: changed SendSyncRequest to use Kernel::Object SyncRequest (instead of just service Interface class) | bunnei | 2014-05-27 | 1 | -2/+2 |
| | |||||
* | svc: added stub for DuplicateHandle SVC call | bunnei | 2014-05-27 | 1 | -1/+8 |
| | |||||
* | svc: added a check to ensure that a service was implemented before attempting to connect to its port | bunnei | 2014-05-23 | 1 | -1/+5 |
| | |||||
* | thread: renamed "WaitCurThread" to "WaitCurrentThread", removed unused "reason" argument | bunnei | 2014-05-23 | 1 | -2/+2 |
| | |||||
* | thread: removed unused SwitchContext/Reschedule reason field, added missing arg parameter to SVC CreateThread | bunnei | 2014-05-23 | 1 | -8/+5 |
| | |||||
* | svc: added Kernel::Reschedule to svc WaitSynchronization1, updated log messages to include newly created handles | bunnei | 2014-05-22 | 1 | -4/+7 |
| | |||||
* | svc: enabled use of newly created kernel thread handle | bunnei | 2014-05-21 | 1 | -5/+5 |
| | |||||
* | mutex: refactored the interface to code to return a Mutex* handle | bunnei | 2014-05-21 | 1 | -1/+1 |
| | |||||
* | mutex: initial commit of HLE module | bunnei | 2014-05-21 | 1 | -4/+5 |
| | |||||
* | svc: added some comments | bunnei | 2014-05-21 | 1 | -0/+7 |
| | |||||
* | thread: moved threading calls to the Kernel namespace | bunnei | 2014-05-21 | 1 | -2/+2 |
| | |||||
* | renamed "syscall" module to "svc" (more accurate naming) | bunnei | 2014-05-21 | 1 | -0/+350 |