| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Allow sharing return types with the rest of the code base. For example,
we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses
'uint128 = std::pair<u64, u64>'.
While we are at it, use size_t instead of std::size_t.
|
| |
|
|
|
|
| |
Ensure the behavior of the previous commit in tests.
|
|
|
|
|
|
| |
Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1
Just remove it altogether because we do not have a use for granularity != 1
|
|\
| |
| | |
buffer_cache/buffer_base: Add a range tracking buffer container and tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to how error prone the container design is, this commit adds unit
tests for it.
Some tests taken from here are based on bugs from using this buffer
container in games, so if we ever break it in the future in a way that
might harm games, the tests should fail.
|
|/
|
|
| |
Makes for less code that we need to maintain.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous to this commit, the tests were using operator[] from
unordered_map to query elements but this silently inserts empty elements
when they don't exist. If all threads were executed without concurrency,
this wouldn't be an issue, but the same unordered_map could be written
from two threads at the same time. This is a data race and makes some
previously inserted elements invisible for a short period of time,
causing them to insert and return an empty element. This default
constructed element (a zero) was used to index an array of fibers that
asserted when one of them was nullptr, shutting the test session off.
To address this issue, lock on thread id reads and writes. This could be
a shared mutex to allow concurrent reads, but the definition of
std::this_thread::get_id is fuzzy when using non-standard techniques
like fibers. I opted to use a standard mutex.
While we are at it, fix the included headers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I made a review comment about this in the PR that this was introduced
in (#3955, commit 71c4779211dc081a3b2dd4af52edad5748e7a7f5), but it
seems to have been missed.
We shouldn't be using this pragma here because it's MSVC specific. This
causes warnings on other compilers.
The test it's surrounding is *extremely* dubious, but for the sake of
silencing warnings on other compilers, we can mark "placebo" as volatile
and be on with it.
|
|
|
|
| |
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.
|
|
|
|
| |
Enforces our desired time units directly with a concrete type.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
CMakeLists: Enable -Wmissing-declarations on Linux builds
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Migrates all of the direct mapping facilities over to the new memory
class. In the process, this also obsoletes the need for memory_setup.h,
so we can remove it entirely from the project.
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Core_Timing: Make core_timing threadsafe by default.
|
| |
| |
| |
| |
| |
| | |
The old implementation had faulty Threadsafe methods where events could
be missing. This implementation unifies unsafe/safe methods and makes
core timing thread safe overall.
|
|/
|
|
| |
This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range.
|
|
|
|
|
| |
Centralizes the page table switching to one spot, rather than making
calling code deal with it everywhere.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Port citra-emu/citra#4244 and citra-emu/citra#4599: Changes to BitField
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Allows getting rid of reliance on the global accessor functions and
instead operating on the provided system instance.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* get rid of boost::optional
* Remove optional references
* Use std::reference_wrapper for optional references
* Fix clang format
* Fix clang format part 2
* Adressed feedback
* Fix clang format and MacOS build
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
Makes the public interface consistent in terms of how accesses are done
on a process object. It also makes it slightly nicer to reason about the
logic of the process class, as we don't want to expose everything to
external code.
|
|
|
|
|
| |
Given games can also request a 32-bit or 39-bit address space, we
shouldn't be hardcoding the address space range as 36-bit.
|
|\
| |
| | |
Port #4171 from Citra: "Tests: Remove glad test OS X work-around"
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Updates the library from 2.2.3 to 2.3.0
|
|
|
|
| |
Removes leftover code from citra that isn't needed.
|
|
|
|
| |
Explicitly cast the value to a u8 to show that this is intentional.
|
|
|
|
| |
Gets rid of file-static behavior.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
|
| |
|
|
|
|
| |
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
|
| |
|
| |
|
|
|
|
|
| |
Removes the need to store to separate SRC and HEADER variables, and then
construct the target in most cases.
|
| |
|
|
|
|
| |
* CoreTiming: New CoreTiming; Add Test for CoreTiming
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# 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
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Don't expose Memory::current_page_table as a global.
|
| |
| |
| |
| | |
This fixes building the tests
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
Missed this in my first implementation. Thanks to @wwylele for pointing
out that this was missing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Modules didn't correctly define their dependencies before, which relied
on the frontends implicitly including every module for linking to
succeed.
Also changed every target_link_libraries call to specify visibility of
dependencies to avoid leaking definitions to dependents when not
necessary.
|
| |
|
|
|
|
|
|
|
|
|
| |
$ (cmake -DENABLE_SDL2:BOOL=false /path/to/citra; gmake)
[...]
[ 85%] Linking CXX executable tests
../common/libcommon.a(microprofile.cpp.o): In function `MicroProfileThreadStart(pthread**, void* (*)(void*))':
src/common/microprofile.cpp:(.text+0x41): undefined reference to `pthread_create'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
|
| |
|
| |
|
| |
|
|
|