aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
Commit message (Collapse)AuthorAgeFilesLines
* hle: kernel: Rename Process to KProcess.bunnei2021-05-051-479/+0
|
* hle: kernel: Remove deprecated Object class.bunnei2021-05-051-15/+0
|
* hle: kernel: Migrate KResourceLimit to KAutoObject.bunnei2021-05-051-5/+3
|
* hle: kernel: Migrate KProcess to KAutoObject.bunnei2021-05-051-9/+23
|
* hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei2021-02-181-7/+4
|
* hle: kernel: svc: Cleanup KEvent/KReadableEvent/KWritableEvent SVCs.bunnei2021-02-051-1/+1
|
* kernel: Rewrite resource limit to be more accurateChloe Marcec2021-01-301-3/+3
| | | | Matches closer to hardware
* hle: kernel: process: Add state lock.bunnei2021-01-281-0/+6
|
* hle: kernel: Recode implementation of KThread to be more accurate.bunnei2021-01-281-0/+63
|
* core: hle: kernel: object: Implement Finalize() virtual method.bunnei2021-01-281-0/+2
|
* hle: kernel: KThread: Clean up thread priorities.bunnei2021-01-281-1/+6
|
* core: hle: kernel: Rename Thread to KThread.bunnei2021-01-281-5/+5
|
* core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.bunnei2021-01-111-28/+22
|
* core: hle: kernel: Update KSynchronizationObject.bunnei2021-01-111-8/+6
|
* hle: kernel: Process: Various style fixes based on code review feedback.bunnei2020-12-061-2/+2
|
* hle: kernel: process: Add schedule count tracking, to be used for yield impl.bunnei2020-12-061-0/+13
|
* kernel/process: Move name and system context to the bottom of the member listLioncash2020-07-151-6/+6
| | | | | | These aren't directly important or commonly used within the process, so we can move these to the bottom to allow everything else to be more likely to be within a cache line.
* kernel: process: Updates for new VMM.bunnei2020-04-171-18/+27
|
* Kernel: Refactor synchronization to better match REFernando Sahmkow2020-02-111-4/+0
|
* Kernel: Change WaitObject to Synchronization object. In order to better ↵Fernando Sahmkow2020-02-111-2/+2
| | | | reflect RE.
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for ↵bunnei2019-11-241-10/+11
| | | | | | | | kernel objects. (#3154) * 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.
* Kernel: Optimize condition variable threads management.Fernando Sahmkow2019-11-211-1/+2
|
* Kernel: Correct behavior of Condition Variables to be more similar to real ↵Fernando Sahmkow2019-11-211-0/+12
| | | | | | | | | hardware. 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.
* Merge pull request #2687 from lioncash/tls-processbunnei2019-07-181-0/+11
|\ | | | | kernel/process: Allocate the process' TLS region during initialization
| * kernel/process: Allocate the process' TLS region during initializationLioncash2019-07-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | Prior to execution within a process beginning, the process establishes its own TLS region for uses (as far as I can tell) related to exception handling. Now that TLS creation was decoupled from threads themselves, we can add this behavior to our Process class. This is also good, as it allows us to remove a stub within svcGetInfo, namely querying the address of that region.
| * kernel/process: Move main thread stack allocation to its own functionLioncash2019-07-071-0/+3
| | | | | | | | Keeps this particular set of behavior isolated to its own function.
* | address review commentaryMichael Scire2019-07-071-4/+19
| |
* | Implement MapPhysicalMemory/UnmapPhysicalMemoryMichael Scire2019-07-071-3/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This implements svcMapPhysicalMemory/svcUnmapPhysicalMemory for Yuzu, which can be used to map memory at a desired address by games since 3.0.0. It also properly parses SystemResourceSize from NPDM, and makes information available via svcGetInfo. This is needed for games like Super Smash Bros. and Diablo 3 -- this PR's implementation does not run into the "ASCII reads" issue mentioned in the comments of #2626, which was caused by the following bugs in Yuzu's memory management that this PR also addresses: * Yuzu's memory coalescing does not properly merge blocks. This results in a polluted address space/svcQueryMemory results that would be impossible to replicate on hardware, which can lead to game code making the wrong assumptions about memory layout. * This implements better merging for AllocatedMemoryBlocks. * Yuzu's implementation of svcMirrorMemory unprotected the entire virtual memory range containing the range being mirrored. This could lead to games attempting to map data at that unprotected range/attempting to access that range after yuzu improperly unmapped it. * This PR fixes it by simply calling ReprotectRange instead of Reprotect.
* kernel/process: Default initialize all member variablesLioncash2019-07-031-2/+2
| | | | | Ensures a Process instance is always created with a deterministic initial state.
* kernel/process: Decouple TLS handling from threadsLioncash2019-07-031-4/+4
| | | | | | | | | | | Extracts out all of the thread local storage management from thread instances themselves and makes the owning process handle the management of the memory. This brings the memory management slightly more in line with how the kernel handles these allocations. Furthermore, this also makes the TLS page management a little more readable compared to the lingering implementation that was carried over from Citra.
* kernel: Differentiate kernel and user processes when picking IDZach Hilman2019-06-101-1/+7
| | | | This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range.
* Merge pull request #2571 from lioncash/refZach Hilman2019-06-091-1/+1
|\ | | | | kernel/process: Make Create()'s name parameter be taken by value
| * kernel/process: Make Create()'s name parameter be taken by valueLioncash2019-06-091-1/+1
| | | | | | | | | | Makes the interface more flexible in terms of how Create() may be called, while still allowing the parameter itself to be moved into.
* | kernel/svc: Implement ↵Lioncash2019-06-091-0/+11
|/ | | | | | | | | | | TotalMemoryUsedWithoutMmHeap/TotalMemoryAvailableWithoutMmHeap Given we don't currently implement the personal heap yet, the existing memory querying functions are essentially doing what the memory querying types introduced in 6.0.0 do. So, we can build the necessary machinery over the top of those and just use them as part of info types.
* kernel/process: Remove unused boost header includeLioncash2019-06-051-1/+0
| | | | | Boost headers typically include a lot of other headers, so removing this can prevent a bit of unnecessary compiler churn when building.
* core/core: Move process execution start to System's Load()Lioncash2019-04-111-2/+5
| | | | | | | | | This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
* kernel: Make handle type declarations constexprLioncash2019-04-111-1/+1
| | | | | | | Some objects declare their handle type as const, while others declare it as constexpr. This makes the const ones constexpr for consistency, and prevent unexpected compilation errors if these happen to be attempted to be used within a constexpr context.
* Merge pull request #2314 from lioncash/constbunnei2019-04-031-1/+1
|\ | | | | kernel/thread: Minor interface cleanup
| * kernel/wait_object: Make ShouldWait() take thread members by pointer-to-constLioncash2019-04-011-1/+1
| | | | | | | | | | Given this is intended as a querying function, it doesn't make sense to allow the implementer to modify the state of the given thread.
* | kernel/svc: Implement svcGetThreadListLioncash2019-04-021-0/+17
|/ | | | | | | | | | | | | Similarly like svcGetProcessList, this retrieves the list of threads from the current process. In the kernel itself, a process instance maintains a list of threads, which are used within this function. Threads are registered to a process' thread list at thread initialization, and unregistered from the list upon thread destruction (if said thread has a non-null owning process). We assert on the debug event case, as we currently don't implement kernel debug objects.
* kernel/process: Report total physical memory used to svcGetInfoLioncash2019-03-281-0/+3
| | | | | | | Reports the (mostly) correct size through svcGetInfo now for queries to total used physical memory. This still doesn't correctly handle memory allocated via svcMapPhysicalMemory, however, we don't currently handle that case anyways.
* kernel/process: Store the total size of the code memory loadedLioncash2019-03-281-0/+3
| | | | | This will be necessary to properly report the used memory size in svcGetInfo.
* kernel/process: Store the main thread stack size to a data memberLioncash2019-03-281-0/+3
| | | | | This will be necessary in order to properly report memory usage within svcGetInfo.
* kernel/process: Make Run's stack size parameter a u64Lioncash2019-03-281-1/+1
| | | | | | This will make operating with the process-related SVC commands much nicer in the future (the parameter representing the stack size in svcStartProcess is a 64-bit value).
* kernel/process: Remove unused AddressMapping structLioncash2019-03-241-8/+0
| | | | Another leftover from citra that's now no longer necessary.
* Merge pull request #2234 from lioncash/mutexbunnei2019-03-211-0/+16
|\ | | | | core/hle/kernel: Make Mutex a per-process class.
| * core/hle/kernel: Make Mutex a per-process class.Lioncash2019-03-141-0/+16
| | | | | | | | | | | | | | Makes it an instantiable class like it is in the actual kernel. This will also allow removing reliance on global accessors in a following change, now that we can encapsulate a reference to the system instance in the class.
* | kernel: Move CodeSet structure to its own source filesLioncash2019-03-201-41/+2
|/ | | | | | | | Given this is utilized by the loaders, this allows avoiding inclusion of the kernel process definitions where avoidable. This also keeps the loading format for all executable data separate from the kernel objects.
* kernel/process: Remove use of global system accessorsLioncash2019-03-121-1/+5
| | | | | Now that we pass in a reference to the system instance, we can utilize it to eliminate the global accessors in Process-related code.
* kernel: Make the address arbiter instance per-processLioncash2019-03-071-2/+20
| | | | | | | | | | 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.