suyu/src/core/hle/kernel
Lioncash b879fb84a2 svc: Correct always true assertion case in SetThreadCoreMask
The reason this would never be true is that ideal_processor is a u8 and
THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how
arithmetic conversions are performed before performing the comparison.

If an unsigned value has a lesser conversion rank (aka smaller size)
than the signed type being compared, then the unsigned value is promoted
to the signed value (i.e. u8 -> s32 happens before the comparison). No
sign-extension occurs here either.

An alternative phrasing:

Say we have a variable named core and it's given a value of -2.

u8 core = -2;

This becomes 254 due to the lack of sign. During integral promotion to
the signed type, this still remains as 254, and therefore the condition
will always be true, because no matter what value the u8 is given it
will never be -2 in terms of 32 bits.

Now, if one type was a s32 and one was a u32, this would be entirely
different, since they have the same bit width (and the signed type would
be converted to unsigned instead of the other way around) but would
still have its representation preserved in terms of bits, allowing the
comparison to be false in some cases, as opposed to being true all the
time.

---

We also get rid of two signed/unsigned comparison warnings while we're
at it.
2018-07-19 15:46:17 -04:00
..
address_arbiter.cpp address_arbiter: Correct assignment within an assertion statement in WakeThreads() 2018-07-18 19:46:46 -04:00
address_arbiter.h Run clang-format on PR. 2018-06-21 21:05:34 -06:00
client_port.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
client_port.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
client_session.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
client_session.h hle: Integrate Domain handling into ServerSession. 2018-01-24 22:18:56 -05:00
errors.h Kernel/Arbiters: Implement WaitForAddress 2018-06-21 01:40:29 -06:00
event.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
event.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
handle_table.cpp Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
handle_table.h handle_table: Remove ConvertSessionToDomain. 2018-01-24 22:18:51 -05:00
hle_ipc.cpp core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
hle_ipc.h core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
kernel.cpp core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
kernel.h Qt: Update the WaitTree widget to show info about the current mutex of each thread. 2018-04-20 21:04:34 -05:00
memory.cpp clang-format 2018-01-16 18:05:21 +00:00
memory.h kernel: Various 64-bit fixes in memory/process/thread 2017-12-29 13:27:58 -05:00
mutex.cpp Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs. 2018-06-21 00:49:43 -06:00
mutex.h Kernel: Remove old and unused Mutex code. 2018-04-20 21:04:32 -05:00
object_address_table.cpp core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
object_address_table.h yuzu: Update license text to be consistent across project. 2018-01-13 16:22:39 -05:00
process.cpp Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
process.h core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
resource_limit.cpp Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
resource_limit.h resource_limit: Make ResourceTypes an enum class 2018-04-20 19:41:45 -04:00
scheduler.cpp core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
scheduler.h scheduler: Protect scheduling functions with a global mutex. 2018-05-10 19:34:52 -04:00
server_port.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
server_port.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
server_session.cpp core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
server_session.h Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation. 2018-02-18 13:25:48 -05:00
session.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
session.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
shared_memory.cpp core/memory, core/hle/kernel: Use std::move where applicable 2018-07-18 19:34:31 -04:00
shared_memory.h svc: SharedMemory size should be 64-bits and cleanup. 2018-02-03 13:36:54 -05:00
svc.cpp svc: Correct always true assertion case in SetThreadCoreMask 2018-07-19 15:46:17 -04:00
svc.h Add & correct miscellaneous things (#470) 2018-05-25 22:31:54 -04:00
svc_wrap.h Add additional missing format. 2018-06-21 21:09:51 -06:00
thread.cpp Merge pull request #690 from lioncash/move 2018-07-18 20:55:55 -07:00
thread.h Run clang-format on PR. 2018-06-21 21:05:34 -06:00
timer.cpp Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
timer.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
vm_manager.cpp Merge pull request #690 from lioncash/move 2018-07-18 20:55:55 -07:00
vm_manager.h core: Replace usages of LOG_GENERIC with new fmt-capable equivalents 2018-04-27 11:57:52 -04:00
wait_object.cpp thread: Add THREADSTATUS_WAIT_HLE_EVENT, remove THREADSTATUS_WAIT_ARB. 2018-03-18 20:56:32 -04:00
wait_object.h wait_object: Refactor to allow waking up a single thread. 2018-01-07 16:33:41 -05:00