summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/address_arbiter.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* address_arbiter: Collapse loops in InsertThread() and RemoveThread()Lioncash2020-02-121-19/+17
| | | | | Same behavior, but without the need to explicitly loop through everything manually.
* address_arbiter: Simplify GetThreadsWaitingOnAddress()Lioncash2020-02-121-9/+8
| | | | | Simplifies the overall function and also allows for it to become a const-qualified member function.
* Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.Fernando Sahmkow2020-01-261-1/+0
| | | | This commit instends on better naming the new purpose of this classes.
* Kernel: Correct behavior of Address Arbiter threads. (#3165)Fernando Sahmkow2019-12-111-20/+46
| | | | | | | | | | | * 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.
* kernel: Remove unnecessary includesLioncash2019-12-081-2/+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.
* core/memory: Migrate over Write{8, 16, 32, 64, Block} to the Memory classLioncash2019-11-271-3/+3
| | | | | | | | | The Write functions are used slightly less than the Read functions, which make these a bit nicer to move over. The only adjustments we really need to make here are to Dynarmic's exclusive monitor instance. We need to keep a reference to the currently active memory instance to perform exclusive read/write operations.
* core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash2019-11-271-9/+19
| | | | | | | | | | | | | | With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
* core/memory: Migrate over address checking functions to the new Memory classLioncash2019-11-271-4/+4
| | | | | | | | | A fairly straightforward migration. These member functions can just be mostly moved verbatim with minor changes. We already have the necessary plumbing in places that they're used. IsKernelVirtualAddress() can remain a non-member function, since it doesn't rely on class state in any form.
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-8/+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.
* Kernel: Corrections to ModifyByWaitingCountAndSignalToAddressIfEqualFernando Sahmkow2019-10-151-5/+13
|
* Kernel: Style and CorrectionsFernando Sahmkow2019-10-151-1/+0
|
* Correct PrepareRescheduleFernando Sahmkow2019-10-151-3/+2
|
* Add PrepareReschedule where required.Fernando Sahmkow2019-10-151-16/+12
|
* Small fixes to address_arbiter to better match the IDB.Fernando Sahmkow2019-03-201-3/+3
|
* kernel/svc: Move address arbiter signaling behind a unified API functionLioncash2019-03-081-2/+16
| | | | | | | Similar to how WaitForAddress was isolated to its own function, we can also move the necessary conditional checking into the address arbiter class itself, allowing us to hide the implementation details of it from public use.
* kernel/svc: Move address arbiter waiting behind a unified API functionLioncash2019-03-081-3/+17
| | | | | | Rather than let the service call itself work out which function is the proper one to call, we can make that a behavior of the arbiter itself, so we don't need to directly expose those implementation details.
* kernel/address_arbiter: Pass in system instance to constructorLioncash2019-03-051-7/+7
| | | | | Allows getting rid of reliance on the global accessor functions and instead operating on the provided system instance.
* kernel/address_arbiter: Minor tidying upLioncash2019-03-051-18/+18
| | | | | - Invert conditions into guard clases where applicable. - Mark std::vector parameter of WakeThreads as const
* kernel/address_arbiter: Convert the address arbiter into a classLioncash2019-03-051-59/+58
| | | | | | 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.
* address_arbiter: Use nested namespaces where applicableLioncash2019-02-161-4/+2
| | | | | | A fairly trivial change. Other sections of the codebase use nested namespaces instead of separate namespaces here. This one must have just been overlooked.
* core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrsLioncash2018-10-151-1/+1
|
* kernel/thread: Make all instance variables privateLioncash2018-10-041-10/+10
| | | | | | | | | | | | | | | | | | | | 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.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-12/+13
|
* core/core: Replace includes with forward declarations where applicableLioncash2018-08-311-0/+2
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* address_arbiter: Return by value from GetThreadsWaitingOnAddress()Lioncash2018-08-051-15/+15
| | | | | In all cases the vector being supplied is empty, so we can just return by value in these instances.
* 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-2/+4
| | | | | Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
* thread: Convert ThreadStatus into an enum classLioncash2018-07-201-2/+2
| | | | | Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time.
* address_arbiter: Correct assignment within an assertion statement in WakeThreads()Lioncash2018-07-191-1/+1
| | | | | | This was introduced within 4f81bc4e1bd12e4df7410c6790ba818d8dbba9c0, and considering there's no comment indicating that this is intentional, this is very likely a bug.
* Kernel/Arbiter: Fix bug in WaitIfLessThanMichael Scire2018-07-171-2/+4
|
* Kernel/Arbiters: Fix casts, cleanup comments/magic numbersMichael Scire2018-06-221-13/+12
|
* Run clang-format on PR.Michael Scire2018-06-221-156/+157
|
* Kernel/Arbiters: HLE is atomic, adjust code to reflect that.Michael Scire2018-06-221-36/+13
|
* Kernel/Arbiters: Clear WaitAddress in SignalToAddressMichael Scire2018-06-211-0/+1
|
* Kernel/Arbiters: Mostly implement SignalToAddressMichael Scire2018-06-211-6/+104
|
* Kernel/Arbiters: Implement WaitForAddressMichael Scire2018-06-211-4/+55
|
* Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs.Michael Scire2018-06-211-0/+46
|
* kernel: Remove unused address_arbiter code.bunnei2018-02-181-91/+0
|
* Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner2017-05-251-4/+3
|
* core: Remove HLE module, consolidate code & various cleanups.bunnei2016-12-221-1/+0
|
* Threading: Reworked the way our scheduler works.Subv2016-12-041-2/+0
| | | | | | | | | | 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.
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-211-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-4/+2
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-191-4/+2
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-12/+14
|
* SVC: Fixed ArbitrateAddress to behave as it does on hardware.Subv2015-12-281-8/+17
| | | | This was verified with hwtests that i plan to upload later on.
* Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.bunnei2015-05-211-0/+3
|
* Memmap: Re-organize memory function in two filesYuri Kunde Schlesner2015-05-151-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.
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-0/+1
|
* SVC: Update various SVCs to cause a reschedule.bunnei2015-04-101-4/+0
| | | | - CreateMutex/ReleaseMutex/ReleaseSemaphore/SetTimer/CancelTimer/ArbitrateAddress
* Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner2015-02-021-4/+2
| | | | | They're finally unnecessary, and will stop cluttering the application's handle table.
* Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner2015-02-021-0/+3
| | | | | | 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.)
* Thread: Modernize two functions that slipped through previous rebasesYuri Kunde Schlesner2015-02-021-2/+2
|
* Kernel: Convert AddressArbiter to not use HandlesYuri Kunde Schlesner2015-01-301-30/+9
|
* Kernel: Remove useless/duplicated comments; mark functions staticYuri Kunde Schlesner2015-01-301-4/+1
|
* AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense.bunnei2015-01-221-8/+8
|
* WaitSynchronizationN: Implement return valuesbunnei2015-01-221-4/+4
|
* Thread: Keep track of multiple wait objects.bunnei2015-01-221-2/+3
|
* AddrArbiter: Implement arbitration types 3 and 4.Subv2015-01-131-2/+19
|
* Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner2015-01-091-1/+1
|
* Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner2015-01-091-4/+8
|
* AddressArbiter: Ported arbitration type 2 from 3dmoo.Subv2015-01-031-0/+11
| | | | (Thanks 3dmoo!)
* Kernel: New handle managerYuri Kunde Schlesner2014-12-281-1/+2
| | | | | | | | | | | 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.
* Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner2014-12-281-2/+2
|
* Rename ObjectPool to HandleTableYuri Kunde Schlesner2014-12-281-1/+1
|
* License changepurpasmart962014-12-211-1/+1
|
* Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-131-7/+1
|
* Thread: Fixed to wait on address when in arbitration.bunnei2014-12-091-1/+1
|
* Remove duplicated docs/update them for changed parameters.Yuri Kunde Schlesner2014-11-241-5/+0
|
* HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner2014-11-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add `override` keyword through the code.Yuri Kunde Schlesner2014-10-261-4/+4
| | | | This was automated using `clang-modernize`.
* Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash2014-08-181-2/+2
| | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
* AddressArbiter: Removed unnecessary HLE::Reschedule.bunnei2014-08-061-1/+0
|
* AddressArbiter: Fixed bug with break statements missing from case statements.bunnei2014-08-061-0/+2
|
* Kernel: Added preliminary support for address arbiters.bunnei2014-07-091-0/+87
AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace.