Age | Commit message (Collapse) | Author |
|
common/fileutil: Convert namespace to Common::FS
|
|
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.
This also allows for high-traffic FS related code to alias the
filesystem function namespace as
namespace FS = Common::FS;
for more concise typing.
|
|
We can simplify this function down into a single line with the use of
fmt. A benefit with the fmt approach is that the fmt variant of
localtime is thread-safe as well, making GetOsTimeZoneOffset()
thread-safe as well.
|
|
Seems like all compilers don't support std::span yet.
|
|
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
|
|
lz4_compression/zstd_compression: Make use of std::span in interfaces
|
|
General: Tidy up clang-format warnings part 2
|
|
|
|
common/virtual_buffer: drop unused includes
|
|
|
|
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.
While we're at it, we can also make the template match the requirements
of the standardized variant as well.
|
|
partition_data_manager: Make data arrays constexpr
|
|
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().
This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.
To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
|
|
logging/backend: Make use of designated initializers
|
|
On DragonFly and NetBSD build fails with
src/common/virtual_buffer.cpp
src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
|
|
common/atomic_ops: Don't cast away volatile from pointers
|
|
Same behavior, less code.
|
|
WriteBuffer (#4465)
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer
With the support of C++20, we can use concepts to deduce if a type is an STL container or not.
* More agressive concept for stl containers
* Add -fconcepts
* Move to common namespace
* Add Common::IsBaseOf
|
|
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
|
|
Preserves the volatility of the pointers being casted.
|
|
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
|
|
This function was relocated to log.h as a constexpr function, so this
can be removed.
|
|
Allows compressing the data and size parameters into one.
|
|
Allows condensing the data and size parameters into a single argument.
|
|
This isn't used on Windows, but is used on non-Windows operating
systems.
|
|
Adds a screenshots directory as a path managed by FileUtil.
|
|
In file included from src/core/hle/kernel/memory/page_table.cpp:5:
src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std'
return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align}));
~~~~~^
src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std'
::operator delete (p, n * sizeof(T), std::align_val_t{Align});
~~~~~^
|
|
With C++20, much of the allocator interface has been simplified, so we
can make the same adjustments.
|
|
Allows removing a bunch of defines in favor of a two liner.
|
|
|
|
|
|
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
|
|
|
|
This is a new attempt at #4206 that shouldn't break windows builds.
If someone else could test on windows, it would be much appreciated.
Previously, the build bot passed but the actual builds failed.
|
|
|
|
cmake: fix fmt linking
|
|
|
|
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
|
|
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking
fails. This fixes the issue.
Note: This was included in the FindBoost changes I shared with
BlinkHawk, however only they were merged. I'm not sure if it was missed,
or if there was an issue with this part of the change.
|
|
|
|
|
|
|
|
|
|
|
|
priority than less important helper threads.
|
|
|
|
|
|
|
|
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.
|
|
Implement SpinLocks, Fibers and a Host Timer
|