Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-04-30 | kernel: match calls to Register and Unregister | Liam | 1 | -3/+28 | |
2023-03-24 | memory: rename global memory references to application memory | Liam | 1 | -2/+2 | |
2023-03-22 | kernel: use KTypedAddress for addresses | Liam | 1 | -51/+57 | |
2023-03-13 | kernel: fix clang build | Liam | 1 | -2/+2 | |
2023-03-13 | kernel: convert KThread to new style | Liam | 1 | -3/+0 | |
2023-03-13 | kernel: remove KLinkedList | Liam | 1 | -4/+0 | |
2023-03-13 | kernel: convert KPort, KSession | Liam | 1 | -6/+5 | |
2023-03-01 | kernel: refactor priority inheritance to represent locks as C++ objects | Liam | 1 | -0/+93 | |
2023-02-21 | service: refactor server architecture | Liam | 1 | -104/+103 | |
Converts services to have their own processes | |||||
2023-02-17 | kernel: add KObjectName | Liam | 1 | -0/+14 | |
2023-02-14 | remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency | arades79 | 1 | -22/+21 | |
Signed-off-by: arades79 <scravers@protonmail.com> | |||||
2023-02-14 | apply clang-format | arades79 | 1 | -1/+2 | |
Signed-off-by: arades79 <scravers@protonmail.com> | |||||
2023-02-14 | add static lifetime to constexpr values to force compile time evaluation where possible | arades79 | 1 | -21/+21 | |
Signed-off-by: arades79 <scravers@protonmail.com> | |||||
2023-02-14 | general: rename CurrentProcess to ApplicationProcess | Liam | 1 | -23/+23 | |
2023-02-11 | core: kernel: k_process: Use application system resource. | bunnei | 1 | -0/+8 | |
2023-02-11 | kernel: Refactor thread_local variable usage | ameerj | 1 | -27/+18 | |
On MSVC at least, there seems to be a non-trivial overhead to calling GetHostThreadId(). This slightly reworks the host_thread_id variable to reduce some of the complexity around its usage, along with some small refactors around current_thread and dummy thread | |||||
2023-01-23 | kernel: fix incorrect locking order in suspension | Liam | 1 | -16/+23 | |
2022-12-23 | kernel: workaround static shared memory initialization | Liam | 1 | -29/+14 | |
2022-12-19 | kernel: remove TimeManager | Liam | 1 | -9/+11 | |
2022-12-06 | general: improve handling of system startup failure | Liam | 1 | -5/+9 | |
2022-12-05 | kernel/kernel: Ensure shutdown threads are always initialized | Lioncash | 1 | -1/+1 | |
2022-11-10 | kernel/svc_types: refresh | Liam | 1 | -7/+11 | |
2022-11-07 | service_thread: fix deletion | Liam | 1 | -22/+20 | |
2022-11-04 | service_thread: register service threads to the logical owner process | Liam | 1 | -10/+17 | |
2022-11-04 | kernel: avoid racy behavior in global suspension | Liam | 1 | -5/+17 | |
2022-11-04 | core: hle: kernel: Integrate system KSystemResource. | bunnei | 1 | -18/+103 | |
2022-11-04 | core: hle: kernel: k_memory_layout: Refresh. | bunnei | 1 | -1/+5 | |
2022-10-31 | kernel: fix single core for service threads | Liam | 1 | -1/+2 | |
2022-10-31 | kernel: fix port tracking | Liam | 1 | -34/+1 | |
2022-10-31 | kernel: invert session request handling flow | Liam | 1 | -2/+22 | |
2022-10-23 | core: barrier service thread shutdown | Liam | 1 | -3/+9 | |
2022-10-19 | core: hle: kernel: Fix InitializePreemption order. | bunnei | 1 | -1/+1 | |
2022-10-19 | core: hle: kernel: k_process: Improve management of page table & cleanup. | bunnei | 1 | -9/+14 | |
2022-10-19 | core: hle: kernel: Remove junk. | bunnei | 1 | -9/+0 | |
2022-10-19 | core: hle: kernel: Integration application memory block slab manager. | bunnei | 1 | -0/+34 | |
2022-10-04 | common: remove "yuzu:" prefix from thread names | Liam | 1 | -1/+1 | |
2022-07-25 | kernel: unlayer CPU interrupt handling | Liam | 1 | -28/+13 | |
2022-07-22 | Project Andio | Kelebek1 | 1 | -13/+21 | |
2022-07-15 | kernel: fix issues with single core mode | Liam | 1 | -3/+16 | |
2022-07-15 | kernel: use KScheduler from mesosphere | Liam | 1 | -9/+1 | |
2022-07-10 | PR | Kelebek1 | 1 | -2/+1 | |
2022-07-10 | Rework CoreTiming | Kelebek1 | 1 | -4/+6 | |
2022-06-23 | kernel: make current thread pointer thread local | Liam | 1 | -1/+12 | |
2022-06-18 | kernel: wait for threads to stop on pause | Liam | 1 | -0/+7 | |
2022-06-16 | kernel: fix some uses of disable_count | Liam | 1 | -1/+0 | |
2022-06-14 | kernel: implement KProcess suspension | Liam | 1 | -20/+29 | |
2022-06-14 | kernel: fix passthrough of local captures in lambda | Liam | 1 | -1/+3 | |
2022-06-09 | CpuManager: simplify pausing | Liam | 1 | -3/+1 | |
2022-04-23 | general: Convert source file copyright comments over to SPDX | Morph | 1 | -3/+2 | |
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later. | |||||
2022-04-16 | hidbus: Implement hidbus and ringcon | german77 | 1 | -0/+18 | |
2022-04-08 | hle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession. | bunnei | 1 | -13/+28 | |
- These are not managed elsewhere, and need to be tracked and closed on emulation shutdown. | |||||
2022-04-07 | core/hle: Replace lock_guard with scoped_lock | Merry | 1 | -8/+8 | |
2022-04-04 | kernel: Fix current_process race | lat9nq | 1 | -4/+4 | |
TSan reported a race at :258 and :803, so make current_process an atomic pointer. | |||||
2022-04-02 | hle: kernel: Create a default thread for services that do not need their own host thread. | bunnei | 1 | -1/+13 | |
2022-03-19 | core: Reduce unused includes | ameerj | 1 | -3/+0 | |
2022-03-15 | core: hle: kernel: Allocate dummy threads on host thread storage. | bunnei | 1 | -4/+5 | |
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed. | |||||
2022-03-15 | core: hle: kernel: Downgrade dangling objects warning to debug. | bunnei | 1 | -2/+2 | |
- It is not impossible to leak kernel objects, so this is not really any issue anymore (albeit, still interesting). | |||||
2022-03-15 | core: hle: kernel: Make object list container global and ensure it is reset on each emulation session. | bunnei | 1 | -7/+9 | |
2022-03-15 | core: hle: kernel: Remove server session tracking. | bunnei | 1 | -22/+0 | |
- These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown. | |||||
2022-03-15 | core: hle: kernel: Update init_slab_heap, use device memory, and add KThreadLocalPage and KPageBuffer. | bunnei | 1 | -26/+1 | |
- Refreshes our slab initialization code to latest known behavior. - Moves all guest kernel slabs into emulated device memory. - Adds KThreadLocalPage and KPageBuffer, which we will use for accurate TLS management. | |||||
2022-02-28 | hle: kernel: Re-create memory layout at initialization. | bunnei | 1 | -41/+43 | |
- As this can only be derived once. | |||||
2022-02-28 | hle: kernel: Remove unused pool locals. | bunnei | 1 | -2/+0 | |
2022-02-28 | hle: kernel: k_memory_manager: Rework for latest kernel behavior. | bunnei | 1 | -16/+17 | |
- Updates the KMemoryManager implementation against latest documentation. - Reworks KMemoryLayout to be accessed throughout the kernel. - Fixes an issue with pool sizes being incorrectly reported. | |||||
2022-02-21 | core: hle: kernel: Remove resource limit hack for PhysicalMemory. | bunnei | 1 | -7/+0 | |
- With prior changes, we now report the correct amount of physical memory available to the emulated process. | |||||
2022-01-21 | hle: kernel: Remove redundant tracking of dummy threads. | bunnei | 1 | -9/+3 | |
- These are already tracked by kernel's registered_objects member. | |||||
2022-01-15 | hle: kernel: k_memory_manager: Clear pages on allocation & free. | bunnei | 1 | -1/+1 | |
- Heap pages should be zero'd. - Also explicitly passed along heap allocation option. | |||||
2022-01-15 | core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager. | bunnei | 1 | -0/+11 | |
2022-01-15 | hle: kernel: Fix service_threads access to be thread safe V2. | bunnei | 1 | -12/+11 | |
- PR #7699 attempted to fix CreateServiceThread and ReleaseServiceThread to be thread safe, but inadvertently introduced a possible dead-lock. - With this PR, we use a worker thread to manage the service thread list, allowing it only to be accessed by a single thread, and guaranteeing threads will not destroy themselves. - Fixes a rare crash in Pokemon Sword/Shield, I've now run this game for ~12 hours non-stop and am quite confident this is a good solution for this issue. | |||||
2022-01-14 | hle: kernel: Fix service_threads access to be thread safe. | bunnei | 1 | -7/+27 | |
- CreateServiceThread and ReleaseServiceThread can be accessed by different threads, uses a lock to make this thread safe. - Fixes a rare crash in Pokemon Sword/Shield that can occur when a new service thread is being created while an old one is being destroyed. | |||||
2021-12-19 | kernel: Manually destroy the current process during shut down | ameerj | 1 | -1/+4 | |
Avoids a memory leak. | |||||
2021-12-07 | hle: kernel: fix timing on thread preemption | FernandoS27 | 1 | -4/+2 | |
2021-12-07 | hle: kernel: Add a flag for indicating that the kernel is currently shutting down. | bunnei | 1 | -0/+18 | |
2021-12-07 | core: hle: kernel: DisableDispatch on suspend threads. | bunnei | 1 | -0/+3 | |
2021-12-07 | core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. | bunnei | 1 | -6/+2 | |
2021-12-07 | core: hle: kernel: Ensure idle threads are closed before destroying scheduler. | bunnei | 1 | -23/+15 | |
2021-12-07 | core: hle: kernel: Reflect non-emulated threads as core 3. | bunnei | 1 | -0/+8 | |
2021-11-18 | Fix crash on exit due to static scoped dummy threads | Adam Heinermann | 1 | -8/+14 | |
2021-11-04 | core: Remove unused includes | ameerj | 1 | -2/+0 | |
2021-10-27 | Fix dangling kernel objects when exiting | Feng Chen | 1 | -6/+7 | |
2021-10-27 | Revert PR7009 | Feng Chen | 1 | -2/+2 | |
2021-10-27 | Fix memory leak | Feng Chen | 1 | -0/+23 | |
2021-08-26 | Revert "kernel: Various improvements to scheduler" | bunnei | 1 | -28/+29 | |
2021-08-16 | kernel: Optimize GetHostThreadID | BreadFish64 | 1 | -10/+13 | |
2021-08-07 | core: hle: kernel: DisableDispatch on suspend threads. | bunnei | 1 | -0/+3 | |
2021-08-07 | core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. | bunnei | 1 | -6/+2 | |
2021-08-07 | core: hle: kernel: Ensure idle threads are closed before destroying scheduler. | bunnei | 1 | -23/+15 | |
2021-08-07 | core: hle: kernel: Reflect non-emulated threads as core 3. | bunnei | 1 | -0/+8 | |
2021-07-21 | hle: kernel: Track and release server sessions, and protect methods with locks. | bunnei | 1 | -12/+66 | |
2021-07-21 | hle: kernel: Ensure current running process is closed. | bunnei | 1 | -5/+6 | |
2021-07-21 | hle: kernel: Ensure global handle table is finalized before closing. | bunnei | 1 | -0/+1 | |
2021-07-21 | hle: kernel: Ensure global handle table is initialized. | bunnei | 1 | -0/+1 | |
2021-07-21 | hle: kernel: Provide methods for tracking dangling kernel objects. | bunnei | 1 | -0/+16 | |
2021-06-24 | common: Replace common_sizes into user-literals | Wunkolo | 1 | -9/+8 | |
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals. | |||||
2021-06-08 | hle: kernel: Remove service thread manager and use weak_ptr. | bunnei | 1 | -14/+4 | |
- We no longer need to queue up service threads to be destroyed. - Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield. | |||||
2021-05-29 | Fix two GCC 11 warnings: Unneeded copies. | Markus Wick | 1 | -1/+1 | |
std::move created an unneeded copy. iterating without reference also created copies. | |||||
2021-05-29 | hle: kernel: KSlabHeap: Allow host or guest allocations. | bunnei | 1 | -1/+2 | |
- Use host allocations for kernel memory, as this is not properly emulated yet. - Use guest allocations for TLS, as this needs to be backed by DeviceMemory. | |||||
2021-05-11 | hle: kernel: Implement named service ports using service interface factory. | bunnei | 1 | -10/+11 | |
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static. | |||||
2021-05-08 | kernel: Eliminate variable shadowing | Lioncash | 1 | -8/+8 | |
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases. | |||||
2021-05-06 | hle: kernel: Move slab resource counts to Kernel. | bunnei | 1 | -1/+11 | |
2021-05-06 | hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. | bunnei | 1 | -3/+3 | |
2021-05-06 | hle: kernel: Migrate to KHandleTable. | bunnei | 1 | -10/+10 | |
2021-05-06 | hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory. | bunnei | 1 | -12/+12 | |
2021-05-06 | hle: kernel: Rename Process to KProcess. | bunnei | 1 | -13/+13 | |
2021-05-06 | hle: kernel: Do not shutdown twice on emulator close. | bunnei | 1 | -3/+1 | |
2021-05-06 | hle: kernel: Cleanup shutdown of persistent kernel objects. | bunnei | 1 | -14/+12 | |
2021-05-06 | hle: kernel: Migrate KClientPort to KAutoObject. | bunnei | 1 | -3/+7 | |
2021-05-06 | hle: kernel: Migrate KResourceLimit to KAutoObject. | bunnei | 1 | -5/+19 | |
2021-05-06 | hle: kernel: Move slab heaps to their own container. | bunnei | 1 | -0/+1 | |
2021-05-06 | hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps. | bunnei | 1 | -25/+25 | |
2021-05-06 | hle: kernel: Ensure all kernel objects with KAutoObject are properly created. | bunnei | 1 | -0/+7 | |
2021-05-06 | hle: kernel: Use unique_ptr for suspend and dummy threads. | bunnei | 1 | -8/+8 | |
2021-05-06 | hle: kernel: Migrate KSharedMemory to KAutoObject. | bunnei | 1 | -20/+25 | |
2021-05-06 | hle: kernel: Migrate KProcess to KAutoObject. | bunnei | 1 | -4/+4 | |
2021-05-06 | hle: kernel: Migrate more of KThread to KAutoObject. | bunnei | 1 | -24/+48 | |
2021-05-06 | hle: kernel: Refactor out various KThread std::shared_ptr usage. | bunnei | 1 | -2/+2 | |
2021-04-14 | k_resource_limit: Minor cleanup of member variables/headers | ameerj | 1 | -3/+4 | |
2021-04-12 | kernel/process: Replace process resource limit instance with the kernel's resource limit | ameerj | 1 | -16/+25 | |
This commit addresses the inaccurate behavior of kernel processes creating their own resource limit, rather than utilizing the kernel's system-wide resource limit instance. | |||||
2021-04-07 | kernel: Increase event and session counts | ameerj | 1 | -2/+2 | |
12.x increased the number of available sessions and event resource counts | |||||
2021-03-27 | hle: kernel: Initialize preemption task after schedulers. | bunnei | 1 | -1/+1 | |
- Fixes a startup crash that occurs if CoreTiming tries to preempt before kernel initialization completes. | |||||
2021-03-24 | hle: kernel: Breakup InitializeMemoryLayout. | bunnei | 1 | -3/+7 | |
2021-03-24 | common: common_sizes: Move sizes to the Common namespace. | bunnei | 1 | -7/+7 | |
2021-03-21 | hle: kernel: Remove unused variable. | bunnei | 1 | -1/+0 | |
2021-03-21 | hle: kernel: k_memory_layout: Derive memory regions based on board layout. | bunnei | 1 | -26/+293 | |
2021-03-21 | hle: kernel: Move KMemoryRegion to its own module and update. | bunnei | 1 | -10/+10 | |
2021-03-06 | hle: kernel: KThread: Rework dummy threads & fix memory leak. | bunnei | 1 | -6/+5 | |
- Dummy threads are created on thread local storage for all host threads. - Fixes a leak by removing creation of fibers, which are not applicable here. | |||||
2021-02-21 | kernel: Fix resource release exception on exit | ameerj | 1 | -2/+7 | |
After rewriting the resource limit, objects releasing reserved resources require a live kernel instance. This commit fixes exceptions that occur due to the kernel being destroyed before some objects released their resources, allowing for a graceful exit. | |||||
2021-02-19 | hle: kernel: Migrate MemoryManager to KMemoryManager. | bunnei | 1 | -8/+8 | |
2021-02-19 | hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others. | bunnei | 1 | -16/+16 | |
2021-02-19 | hle: kernel: Migrate SlabHeap to KSlabHeap. | bunnei | 1 | -5/+5 | |
2021-02-19 | hle: kernel: Migrate MemoryLayout to KMemoryLayout. | bunnei | 1 | -2/+2 | |
2021-02-19 | hle: kernel: Rename SharedMemory to KSharedMemory. | bunnei | 1 | -17/+17 | |
2021-02-13 | kernel: More accurately reserve and release resources | ameerj | 1 | -3/+12 | |
2021-02-13 | kernel: Unify result codes (#5890) | Chloe | 1 | -1/+1 | |
* kernel: Unify result codes Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways. * oops * rename errors to svc_results | |||||
2021-02-03 | Simplify limitableresource names | Chloe Marcec | 1 | -10/+6 | |
2021-01-30 | kernel: Rewrite resource limit to be more accurate | Chloe Marcec | 1 | -13/+17 | |
Matches closer to hardware | |||||
2021-01-29 | hle: kernel: threading: Fix bug with host thread naming. | bunnei | 1 | -3/+2 | |
2021-01-29 | hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling. | bunnei | 1 | -7/+20 | |
2021-01-29 | kernel: Fix build errors. | bunnei | 1 | -2/+2 | |
2021-01-29 | hle: kernel: Recode implementation of KThread to be more accurate. | bunnei | 1 | -5/+5 | |
2021-01-29 | kernel: k_light_lock: Simplify EmuThreadHandle implementation. | bunnei | 1 | -14/+7 | |
2021-01-29 | hle: kernel: KThread: Fix ThreadType definition. | bunnei | 1 | -1/+1 | |
2021-01-29 | hle: kernel: Move single core "phantom mode" out of KThread. | bunnei | 1 | -1/+20 | |
- This is a workaround that does not belong in a kernel primitive. | |||||
2021-01-29 | hle: kernel: KThread: Remove thread types that do not exist. | bunnei | 1 | -5/+3 | |
2021-01-29 | core: hle: kernel: Rename Thread to KThread. | bunnei | 1 | -7/+7 | |
2021-01-11 | hle: kernel: thread: Preserve thread wait reason for debugging only. | bunnei | 1 | -0/+2 | |
- This is decoupled from core functionality and used for debugging only. | |||||
2021-01-11 | hle: kernel: Rename thread "status" to "state". | bunnei | 1 | -2/+2 | |
2021-01-11 | hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState. | bunnei | 1 | -1/+1 | |
- This is how the real kernel works, and is more accurate and simpler. | |||||
2021-01-11 | core: hle: kernel: Update KSynchronizationObject. | bunnei | 1 | -13/+2 | |
2020-12-30 | hle: kernel: Manage service threads on another thread. | bunnei | 1 | -9/+20 | |
- This is to allow service threads to defer destruction of themselves. | |||||
2020-12-30 | hle: kernel: Manage host thread IDs using TLS. | bunnei | 1 | -46/+31 | |
- Avoids the need to have a large map of host to guest thread IDs. | |||||
2020-12-29 | hle: kernel: Move ServiceThread ownership to KernelCore. | bunnei | 1 | -1/+20 | |
- Fixes a circular dependency which prevented threads from being released on shutdown. | |||||
2020-12-29 | core: hle: kernel: Clear process list on boot. | bunnei | 1 | -2/+2 | |
2020-12-29 | core: kernel: Clear process list earlier. | bunnei | 1 | -2/+2 | |
2020-12-29 | core: hle: server_session: Use separate threads for each service connection. | bunnei | 1 | -1/+1 | |
2020-12-06 | hle: kernel: Migrate to KScopedSchedulerLock. | bunnei | 1 | -2/+2 | |
2020-12-06 | hle: kernel: Rewrite scheduler implementation based on Mesopshere. | bunnei | 1 | -35/+24 | |
2020-11-29 | core: arm: Implement InvalidateCacheRange for CPU cache invalidation. | bunnei | 1 | -5/+10 | |
2020-11-29 | common: fiber: Use boost::context instead of native fibers on Windows. | bunnei | 1 | -1/+1 | |
2020-11-29 | hle: kernel: multicore: Replace n-JITs impl. with 4 JITs. | bunnei | 1 | -6/+17 | |
2020-10-27 | hle/kernel: Remove unused registered_core_threads to fix data races | ReinUsesLisp | 1 | -5/+0 | |
This member was only used on asserts and it triggered data races. Remove it to fix them. | |||||
2020-10-21 | Revert "core: Fix clang build" | bunnei | 1 | -1/+1 | |
2020-10-21 | kernel: Fix build with recent compiler flag changes | Lioncash | 1 | -4/+8 | |
This slipped through the cracks due to another change being merged before the compiler flag changes. | |||||
2020-10-18 | core: Fix clang build | Lioncash | 1 | -1/+1 | |
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795 | |||||
2020-10-13 | kernel: Implement host thread register methods without locking | ReinUsesLisp | 1 | -28/+38 | |
Locks on GetCurrentHostThreadID were causing performance issues according to Visual Studio's profiler. It was consuming twice the time as arm_interface.Run(). The cost was not in the function itself but in the lockinig it required. Reimplement these functions using atomics and static storage instead of an unordered_map. This is a side effect to avoid locking and using linked lists for reads. Replace unordered_map with a linear search. | |||||
2020-08-26 | hle/kernel: Fix data race in GetCurrentHostThreadID | ReinUsesLisp | 1 | -1/+2 | |
As reported by tsan, host_thread_ids could be read while any of the RegisterHostThread variants were called. To fix this, lock the register mutex when yuzu is running in multicore mode and GetCurrentHostThreadID is called. | |||||
2020-07-28 | core_timing: Make use of uintptr_t to represent user_data | Lioncash | 1 | -1/+1 | |
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly. | |||||
2020-07-16 | cpu_manager: Mark function getters as static | Lioncash | 1 | -5/+6 | |
All these do are return std::function instances of static functions, so these can be used without an instance of the CPU manager. | |||||
2020-07-16 | core_timing: Make TimedCallback take std::chrono::nanoseconds | Lioncash | 1 | -1/+1 | |
Enforces our desired time units directly with a concrete type. | |||||
2020-07-16 | core_timing: Make use of std::chrono with ScheduleEvent | Lioncash | 1 | -2/+4 | |
2020-07-15 | kernel/handle_table: Remove usages of the global system instance | Lioncash | 1 | -2/+3 | |
Removes even more usages of the global system instance, trimming away more dependencies on global variables and making them explicit in the interface. | |||||
2020-06-28 | Core/Common: Address Feedback. | Fernando Sahmkow | 1 | -9/+5 | |
2020-06-27 | General: Cleanup legacy code. | Fernando Sahmkow | 1 | -79/+2 | |
2020-06-27 | Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak. | Fernando Sahmkow | 1 | -1/+11 | |
2020-06-27 | Scheduler: Correct Reload/Unload | Fernando Sahmkow | 1 | -0/+1 | |
2020-06-27 | General: Move ARM_Interface into Threads. | Fernando Sahmkow | 1 | -38/+21 | |
2020-06-27 | Core: Refactor ARM Interface. | Fernando Sahmkow | 1 | -1/+27 | |
2020-06-27 | SingleCore: Move Host Timing from a sepparate thread to main cpu thread. | Fernando Sahmkow | 1 | -1/+1 | |
2020-06-27 | General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. | Fernando Sahmkow | 1 | -0/+15 | |
2020-06-27 | General: Fix Stop function | Fernando Sahmkow | 1 | -0/+15 | |
2020-06-27 | Kernel: Preempt Single core on redudant yields. | Fernando Sahmkow | 1 | -0/+4 | |
2020-06-27 | General: Initial Setup for Single Core. | Fernando Sahmkow | 1 | -0/+19 | |
2020-06-27 | Kernel: Fixes, corrections and asserts to scheduler and different svcs. | Fernando Sahmkow | 1 | -0/+1 | |
2020-06-27 | General: Recover Prometheus project from harddrive failure | Fernando Sahmkow | 1 | -7/+77 | |
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system. | |||||
2020-04-17 | kernel: resource_limit: Reserve physical memory. | bunnei | 1 | -1/+6 | |
2020-04-17 | kernel: Initialize memory layout for new VMM. | bunnei | 1 | -0/+115 | |
2020-04-15 | CMakeLists: Make -Wreorder a compile-time error | Lioncash | 1 | -1/+1 | |
This can result in silent logic bugs within code, and given the amount of times these kind of warnings are caused, they should be flagged at compile-time so no new code is submitted with them. | |||||
2020-03-03 | core: Implement separate A32/A64 ARM interfaces. | bunnei | 1 | -0/+4 | |
2020-02-22 | Kernel: Address Feedback. | Fernando Sahmkow | 1 | -11/+16 | |
2020-02-22 | Kernel: Implement Time Manager. | Fernando Sahmkow | 1 | -1/+11 | |
2020-02-22 | Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel. | Fernando Sahmkow | 1 | -12/+76 | |
2020-02-22 | Kernel: Make global scheduler depend on KernelCore | Fernando Sahmkow | 1 | -3/+11 | |
2020-02-11 | Kernel: Refactor synchronization to better match RE | Fernando Sahmkow | 1 | -1/+12 | |
2020-02-11 | Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. | Fernando Sahmkow | 1 | -2/+2 | |
2020-01-31 | kernel/physical_core: Remove unused kernel reference member variable | Lioncash | 1 | -4/+4 | |
This isn't used within the class, so it can be removed to simplify the overall interface. While we're in the same area, we can simplify a unique_ptr reset() call. | |||||
2020-01-27 | System: Address Feedback | Fernando Sahmkow | 1 | -2/+3 | |
2020-01-26 | ArmInterface: Delegate Exclusive monitor factory to exclusive monitor interfasce. | Fernando Sahmkow | 1 | -15/+2 | |
2020-01-25 | Core: Refactor CPU Management. | Fernando Sahmkow | 1 | -1/+63 | |
This commit moves ARM Interface and Scheduler handling into the kernel. | |||||
2019-12-11 | Kernel: Correct behavior of Address Arbiter threads. (#3165) | Fernando Sahmkow | 1 | -3/+3 | |
* Kernel: Correct behavior of Address Arbiter threads. This corrects arbitration threads to behave just like in Horizon OS. They are added into a container and released according to what priority they had when added. Horizon OS does not reorder them if their priority changes. * Kernel: Address Feedback. | |||||
2019-12-08 | kernel: Remove unnecessary includes | Lioncash | 1 | -1/+0 | |
Over the course of the changes to the kernel code, a few includes are no longer necessary, particularly with the change over to std::shared_ptr from Boost's intrusive_ptr. | |||||
2019-11-27 | core/memory; Migrate over SetCurrentPageTable() to the Memory class | Lioncash | 1 | -7/+11 | |
Now that literally every other API function is converted over to the Memory class, we can just move the file-local page table into the Memory implementation class, finally getting rid of global state within the memory code. | |||||
2019-11-27 | core_timing: Use better reference tracking for EventType. (#3159) | bunnei | 1 | -6/+7 | |
* core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways. | |||||
2019-11-25 | kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) | bunnei | 1 | -9/+10 | |
* 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-11-21 | Kernel: Optimize condition variable threads management. | Fernando Sahmkow | 1 | -1/+1 | |
2019-11-21 | Kernel: Correct behavior of Condition Variables to be more similar to real hardware. | Fernando Sahmkow | 1 | -0/+3 | |
This commit ensures cond var threads act exactly as they do in the real console. The original implementation uses an RBTree and the behavior of cond var threads is that at the same priority level they act like a FIFO. | |||||
2019-10-15 | Kernel: Reverse global accessor removal. | Fernando Sahmkow | 1 | -8/+0 | |
2019-10-15 | Kernel Scheduler: Make sure the global scheduler shutdowns correctly. | Fernando Sahmkow | 1 | -0/+2 | |
2019-10-15 | Kernel: Correct Results in Condition Variables and Mutexes | Fernando Sahmkow | 1 | -6/+7 | |
2019-10-15 | Kernel: Remove global system accessor from WaitObject | Fernando Sahmkow | 1 | -0/+8 | |
2019-10-15 | Kernel: Initial implementation of thread preemption. | Fernando Sahmkow | 1 | -0/+16 | |
2019-10-15 | Kernel: Style and Corrections | Fernando Sahmkow | 1 | -1/+1 | |
2019-10-15 | Add interfacing to the Global Scheduler | Fernando Sahmkow | 1 | -0/+10 | |
2019-06-10 | kernel: Differentiate kernel and user processes when picking ID | Zach Hilman | 1 | -4/+10 | |
This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range. | |||||
2019-04-17 | kernel/thread: Unify wait synchronization types | Lioncash | 1 | -2/+1 | |
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-12 | core/cpu_core_manager: Create threads separately from initialization. | Lioncash | 1 | -1/+6 | |
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process. | |||||
2019-04-07 | kernel: Handle page table switching within MakeCurrentProcess() | Lioncash | 1 | -0/+2 | |
Centralizes the page table switching to one spot, rather than making calling code deal with it everywhere. | |||||
2019-04-02 | kernel/svc: Implement svcGetProcessList | Lioncash | 1 | -0/+4 | |
This service function simply copies out a specified number of kernel process IDs, while simultaneously reporting the total number of processes. | |||||
2019-04-01 | kernel/resource_limit: Remove the name member from resource limits | Lioncash | 1 | -1/+1 | |
This doesn't really provide any benefit to the resource limit interface. There's no way for callers to any of the service functions for resource limits to provide a custom name, so all created instances of resource limits other than the system resource limit would have a name of "Unknown". The system resource limit itself is already trivially identifiable from its limit values, so there's no real need to take up space in the object to identify one object meaningfully out of N total objects. | |||||
2019-04-01 | general: Use deducation guides for std::lock_guard and std::unique_lock | Lioncash | 1 | -1/+1 | |
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future. | |||||
2019-03-24 | core/core_timing: Make callback parameters consistent | Lioncash | 1 | -1/+1 | |
In some cases, our callbacks were using s64 as a parameter, and in other cases, they were using an int, which is inconsistent. To make all callbacks consistent, we can just use an s64 as the type for late cycles, given it gets rid of the need to cast internally. While we're at it, also resolve some signed/unsigned conversions that were occurring related to the callback registration. | |||||
2019-03-20 | Fix small bug that kept a thread as a condvar thread after being signalled. | Fernando Sahmkow | 1 | -1/+2 | |
2019-03-20 | Add CondVar Thread State. | Fernando Sahmkow | 1 | -1/+1 | |
2019-03-08 | kernel: Make the address arbiter instance per-process | Lioncash | 1 | -11/+1 | |
Now that we have the address arbiter extracted to its own class, we can fix an innaccuracy with the kernel. Said inaccuracy being that there isn't only one address arbiter. Each process instance contains its own AddressArbiter instance in the actual kernel. This fixes that and gets rid of another long-standing issue that could arise when attempting to create more than one process. | |||||
2019-03-05 | kernel/address_arbiter: Pass in system instance to constructor | Lioncash | 1 | -7/+12 | |
Allows getting rid of reliance on the global accessor functions and instead operating on the provided system instance. | |||||
2019-03-05 | kernel/address_arbiter: Convert the address arbiter into a class | Lioncash | 1 | -0/+11 | |
Places all of the functions for address arbiter operation into a class. This will be necessary for future deglobalizing efforts related to both the memory and system itself. | |||||
2019-02-16 | core_timing: Convert core timing into a class | Lioncash | 1 | -6/+6 | |
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces. | |||||
2019-02-12 | core_timing: Rename CoreTiming namespace to Core::Timing | Lioncash | 1 | -3/+3 | |
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace. | |||||
2019-02-01 | kernel: Remove the Timer class | Lioncash | 1 | -42/+0 | |
A holdover from citra, the Horizon kernel on the switch has no prominent kernel object that functions as a timer. At least not to the degree of sophistication that this class provided. As such, this can be removed entirely. This class also wasn't used at all in any meaningful way within the core, so this was just code sitting around doing nothing. This also allows removing a few things from the main KernelCore class that allows it to use slightly less resources overall (though very minor and not anything really noticeable). | |||||
2019-01-01 | core/kernel: Remove unnecessary inclusions | Lioncash | 1 | -1/+0 | |
Gets rid of a few unnecessary header dependencies in some source files. | |||||
2018-12-19 | kernel/kernel: Use correct initial PID for userland Process instances | Lioncash | 1 | -4/+2 | |
Starts the process ID counter off at 81, which is what the kernel itself checks against internally when creating processes. It's actually supposed to panic if the PID is less than 81 for a userland process. | |||||
2018-12-19 | kernel/thread: Make thread_id a 64-bit value | Lioncash | 1 | -2/+2 | |
The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value. | |||||
2018-12-19 | kernel/process: Make process_id a 64-bit value | Lioncash | 1 | -2/+2 | |
In the actual kernel, this is a 64-bit value, so we shouldn't be using a 32-bit type to handle it. | |||||
2018-11-29 | hle_ipc: Refactor SleepClientThread to avoid ReadableEvent | Zach Hilman | 1 | -2/+0 | |
2018-11-29 | kernel/event: Reference ReadableEvent from WritableEvent | Zach Hilman | 1 | -17/+0 | |
2018-11-29 | kernel: Add named event table | Zach Hilman | 1 | -0/+19 | |
Used to store ReadableEvents of all events on the system. | |||||
2018-11-20 | kernel/resource_limit: Clean up interface | Lioncash | 1 | -63/+16 | |
Cleans out the citra/3DS-specific implementation details that don't apply to the Switch. Sets the stage for implementing ResourceLimit instances properly. While we're at it, remove the erroneous checks within CreateThread() and SetThreadPriority(). While these are indeed checked in some capacity, they are not checked via a ResourceLimit instance. In the process of moving out Citra-specifics, this also replaces the system ResourceLimit instance's values with ones from the Switch. | |||||
2018-10-28 | core: Make System references const where applicable | Lioncash | 1 | -2/+2 | |
2018-10-20 | kernel/process: Make the handle table per-process | Lioncash | 1 | -10/+0 | |
In the kernel, there isn't a singular handle table that everything gets tossed into or used, rather, each process gets its own handle table that it uses. This currently isn't an issue for us, since we only execute one process at the moment, but we may as well get this out of the way so it's not a headache later on. | |||||
2018-10-10 | kernel/thread: Use a regular pointer for the owner/current process | Lioncash | 1 | -6/+6 | |
There's no real need to use a shared pointer in these cases, and only makes object management more fragile in terms of how easy it would be to introduce cycles. Instead, just do the simple thing of using a regular pointer. Much of this is just a hold-over from citra anyways. It also doesn't make sense from a behavioral point of view for a process' thread to prolong the lifetime of the process itself (the process is supposed to own the thread, not the other way around). | |||||
2018-10-04 | kernel/thread: Make all instance variables private | Lioncash | 1 | -18/+18 | |
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-07 | core: Migrate current_process pointer to the kernel | Lioncash | 1 | -0/+14 | |
Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live. | |||||
2018-09-02 | service: Migrate global named port map to the KernelCore class | Lioncash | 1 | -0/+24 | |
Now that we have a class representing the kernel in some capacity, we now have a place to put the named port map, so we move it over and get rid of another piece of global state within the core. | |||||
2018-08-29 | kernel: Eliminate kernel global state | Lioncash | 1 | -15/+268 | |
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-13 | kernel/object: Tighten object against data races | Lioncash | 1 | -1/+1 | |
Despite being covered by a global mutex, we should still ensure that the class handles its reference counts properly. This avoids potential shenanigans when it comes to data races. Given this is the root object that drives quite a bit of the kernel object hierarchy, ensuring we always have the correct behavior (and no races) is a good thing. | |||||
2018-08-03 | core/memory: Get rid of 3DS leftovers | Lioncash | 1 | -5/+1 | |
Removes leftover code from citra that isn't needed. | |||||
2018-07-31 | kernel: Remove unused object_address_table.cpp/.h | Lioncash | 1 | -2/+0 | |
These source files were entirely unused throughout the rest of the codebase. This also has the benefit of getting rid of a global variable as well. | |||||
2018-07-23 | hle: Remove config_mem.h/.cpp | Lioncash | 1 | -3/+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 | -2/+0 | |
This is a holdover from citra that's essentially unused. | |||||
2018-03-14 | core: Move process creation out of global state. | bunnei | 1 | -1/+0 | |
2018-01-01 | kernel: Add ObjectAddressTable class. | bunnei | 1 | -2/+5 | |
2017-05-30 | Kernel: Move HandleTable to a separate file | Yuri Kunde Schlesner | 1 | -84/+1 | |
2017-05-30 | Kernel: Move WaitObject to a separate file | Yuri Kunde Schlesner | 1 | -79/+0 | |
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 | |