Lioncash
2296e921d2
core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
6 years ago
Lioncash
f808258ed9
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
6 years ago
Lioncash
b724a4d90c
General: Tidy up clang-format warnings part 2
6 years ago
Lioncash
8e86fa7e60
common/concepts: Rename IsBaseOf to DerivedFrom
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.
6 years ago
Lioncash
87c64c41d2
system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
6 years ago
Lioncash
a10d64ea79
kernel: Remove unused variables
Resolves a few compiler warnings.
6 years ago
Lioncash
9893da8e2c
scheduler: Resolve sign conversion warning
6 years ago
Lioncash
1a45b15a8c
address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
6 years ago
Lioncash
a77ee63f65
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
6 years ago
Lioncash
b249e4e0ce
yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
6 years ago
Lioncash
f525da56e5
service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
6 years ago
Lioncash
9b837c6069
buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
6 years ago
Lioncash
24bd068a08
buffer_queue: Make use of designated initializers
6 years ago
Lioncash
b9831fd80a
profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
6 years ago
Lioncash
3fcaf937d2
profile_manager: Make use of designated initializers
More compact code.
6 years ago
David Marcec
6a0b77996b
sm: Make use of IsBaseOf for GetService
6 years ago
David
9b75481755
ipc: Allow all trivially copyable objects to be passed directly into 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
6 years ago
Morph
fc86cb4ca2
minor nits
6 years ago
David Marcec
e586921c28
am: Unstub SetScreenShotPermission
6 years ago
Morph
1241020093
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
6 years ago
Morph
45fd67c109
fs: Rename SaveDataDescriptor to SaveDataAttribute
6 years ago
ReinUsesLisp
bc699ace15
service/bsd: Handle Poll with no entries accurately
Testing shows that Poll called with zero entries returns -1 and signals
an errno of zero.
6 years ago
ReinUsesLisp
f7d59f3e0e
services/bsd: Implement most of bsd:s
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName,
GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom,
Send, SendTo, Write, and Close
The implementation was done referencing: SwIPC, switchbrew, testing
with libnx and inspecting its code, general information about bsd
sockets online, and analysing official software.
Not everything from these service calls is implemented, but everything
that is not implemented will be logged in some way.
6 years ago
ReinUsesLisp
2c67bbf609
service/sockets: Add worker pool abstraction
Manage worker threads with an easy to use abstraction.
We can expand this to support thread deletion in the future.
6 years ago
ReinUsesLisp
5692c48ab7
service/sockets: Add worker abstraction to execute blocking calls asynchronously
This abstraction allows executing blocking functions (like recvfrom on a
socket configured for blocking) without blocking the service thread.
It is intended to be used with SleepClientThread.
6 years ago
ReinUsesLisp
80b4bd3583
service/sockets: Add translate functions
These functions translate from Network enumerations/structures to guest
enumerations/structures and viceversa.
6 years ago
ReinUsesLisp
22263ccaa4
service/sockets: Add enumerations and structures
Add guest enumerations and structures used in socket services
6 years ago
ReinUsesLisp
ef8acc9c3d
services/nifm: Implement GetCurrentIpAddress
This is trivially implemented using the Network abstraction
- Used by ftpd
6 years ago
bunnei
db94457205
Update src/core/hle/service/nvdrv/devices/nvmap.cpp
Co-authored-by: LC <mathew1800@gmail.com>
6 years ago
Lioncash
a7af349dae
core_timing: Make use of uintptr_t to represent user_data
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.
6 years ago
CrazyMax
1ffff4dab2
remove unused variable;
6 years ago
bunnei
05def61398
hle: nvdrv: Rewrite of GPU memory management.
6 years ago
Lioncash
7b070bbf62
nvflinger: Mark interface functions with return values as [[nodiscard]]
Not using the return value of these functions are undeniably the source
of a bug. This way we allow compilers to loudly make any future misuses
evident.
6 years ago
Lioncash
5dab23e017
nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return
value of Lock() which is correct.
6 years ago
David Marcec
380658c21d
audio_core: Apollo Part 1, AudioRenderer refactor
6 years ago
David Marcec
8abb31a19d
vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
Needed for dark souls and monster hunter
6 years ago
David Marcec
8248d76964
Address issues
6 years ago
David Marcec
d7d2c27b48
swkbd: Return result for Calc request for inlined swkbd
Fixes random swkbd popups in monster hunter
6 years ago
Lioncash
e54c940abf
mii/manager: Resolve sign mismatch warnings
Previously the loop termination condition was testing variables of
different signedness.
6 years ago
Lioncash
7f989378c0
mii/manager: Make use of designated initializers
Allows returning the structure in a more concise manner.
6 years ago
Lioncash
8bef49cde5
kernel/thread: Remove unimplemented function prototype
This isn't used, so it can be removed.
6 years ago
Lioncash
2bab07c367
kernel: Remove unused variables
Resolves some compiler warnings in the Linux build.
6 years ago
Lioncash
07d080ecc8
kernel: Add missing include
6 years ago
Lioncash
f0125b2be8
cpu_manager: Mark function getters as static
All these do are return std::function instances of static functions, so
these can be used without an instance of the CPU manager.
6 years ago
David Marcec
0319cc1c37
hid: Only update keyboard & debug pad inputs if enabled
Previously we would ignore this setting and would update the states regardless of the user setting
6 years ago
Morph
5892fc1555
Add comment to clarify the nullptr check
6 years ago
Morph
2079bb4090
filesystem: Create subdirectories prior to creating a file
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within.
This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
6 years ago
Lioncash
bef1844a51
core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
6 years ago
Lioncash
8b50c660df
core_timing: Make use of std::chrono with ScheduleEvent
6 years ago
Lioncash
73bb87c06b
kernel/process: Move name and system context to the bottom of the member list
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.
6 years ago