summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/mutex.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.bunnei2021-01-111-42/+0
|
* Clang Format.Fernando Sahmkow2020-06-271-1/+2
|
* SVC: Correct ArbitrateUnlockFernando Sahmkow2020-06-271-0/+3
|
* core/hle/kernel: Make Mutex a per-process class.Lioncash2019-03-151-9/+11
| | | | | | | 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: Eliminate kernel global stateLioncash2018-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* kernel: Move object class to its own source filesLioncash2018-08-021-1/+1
| | | | | | General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
* kernel: Remove unnecessary includesLioncash2018-07-311-4/+2
| | | | | Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
* Kernel: Remove old and unused Mutex code.Subv2018-04-211-79/+3
|
* Kernel: Corrected the implementation of svcArbitrateLock and svcArbitrateUnlock.Subv2018-04-211-0/+12
| | | | | | | | | | Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case. Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock. TODO: * Fix svcWaitProcessWideKey * Fix svcSignalProcessWideKey * Remove the Mutex class.
* clang-formatMerryMage2018-01-161-3/+3
|
* Kernel: Properly keep track of mutex lock data in the guest memory. This fixes userland locking/unlocking.Subv2018-01-091-8/+13
|
* svc: Implement svcLockMutex.bunnei2018-01-011-5/+32
|
* Merge remote-tracking branch 'upstream/master' into nxbunnei2017-10-101-1/+2
| | | | | | | | | | | | | | | | | # Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
* Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner2017-05-301-0/+1
| | | | | Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
* Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexesSubv2017-01-041-0/+6
|
* Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv2017-01-041-0/+1
|
* Kernel/Mutex: Implemented priority inheritance.Subv2017-01-041-5/+2
| | | | | | | 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.Subv2017-01-041-2/+3
| | | | This will be useful when implementing mutex priority inheritance.
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-2/+0
| | | | | | | 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 Peyrot2016-09-181-6/+12
|
* General: Fix up doxygen commentsLioncash2015-09-101-4/+3
|
* Mutex: Locks should be recursive.bunnei2015-02-101-2/+1
|
* Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner2015-02-021-1/+1
| | | | | They're finally unnecessary, and will stop cluttering the application's handle table.
* Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner2015-02-021-1/+1
| | | | | | | | | | | | | | | | 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.)
* Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner2015-02-021-1/+2
| | | | | | This should speed up compile times a bit, as well as enable more liberal use of forward declarations. (Due to SharedPtr not trying to emit the destructor anymore.)
* Kernel: Mark all appropriate kernel objects as "final"Yuri Kunde Schlesner2015-01-301-1/+1
|
* Kernel: Convert Mutex to not use HandlesYuri Kunde Schlesner2015-01-301-13/+39
|
* Mutex: Cleanup and remove redundant code.bunnei2015-01-221-1/+1
|
* License changepurpasmart962014-12-211-1/+1
|
* Mutex: Release all held mutexes when a thread exits.Subv2014-12-071-0/+6
|
* Remove duplicated docs/update them for changed parameters.Yuri Kunde Schlesner2014-11-241-1/+0
|
* HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner2014-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 generatedEmmanuel Gil Peyrot2014-11-191-1/+1
|
* Kernel: Updated various kernel function "name" arguments to be const references.bunnei2014-06-131-1/+1
|
* svc: added optional name field to Event and Mutex (used for debugging)bunnei2014-06-031-1/+2
|
* mutex: removed docstring comment that is no longer relevantbunnei2014-05-271-1/+0
|
* mutex: added additional docstringsbunnei2014-05-271-0/+2
|
* mutex: refactored the interface to code to return a Mutex* handlebunnei2014-05-211-1/+1
|
* mutex: initial commit of HLE modulebunnei2014-05-211-0/+26