Skip to content
Snippets Groups Projects
  1. Jul 23, 2018
  2. Jul 22, 2018
  3. Jul 21, 2018
  4. Jul 20, 2018
  5. Jul 19, 2018
    • Lioncash's avatar
      hle_ipc: Introduce generic WriteBuffer overload for multiple container types · ff500a7b
      Lioncash authored
      This introduces a slightly more generic variant of WriteBuffer().
      Notably, this variant doesn't constrain the arguments to only accepting
      std::vector instances. It accepts whatever adheres to the
      ContiguousContainer concept in the C++ standard library.
      
      This essentially means, std::array, std::string, and std::vector can be
      used directly with this interface. The interface no longer forces you to
      solely use containers that dynamically allocate.
      
      To ensure our overloads play nice with one another, we only enable the
      container-based WriteBuffer if the argument is not a pointer, otherwise
      we fall back to the pointer-based one.
      ff500a7b
    • Lioncash's avatar
      svc: Correct always true assertion case in SetThreadCoreMask · b879fb84
      Lioncash authored
      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.
      b879fb84
    • Lioncash's avatar
      hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads · af2698dc
      Lioncash authored
      Previously, the buffer_index parameter was unused, causing all writes to
      use the buffer index of zero, which is not necessarily what is wanted
      all the time.
      
      Thankfully, all current usages don't use a buffer index other than zero,
      so this just prevents a bug before it has a chance to spring.
      af2698dc
  6. Jul 18, 2018
  7. Jul 17, 2018
  8. Jul 16, 2018
  9. Jul 14, 2018
  10. Jul 03, 2018
  11. Jun 22, 2018
  12. Jun 21, 2018
  13. Jun 20, 2018
  14. Jun 18, 2018
  15. Jun 02, 2018
    • Subv's avatar
      Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may... · 9cd87a63
      Subv authored
      Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
      
      This situation may happen like so:
      Thread 1 with low priority calls WaitProcessWideKey with timeout.
      Thread 2 with high priority calls WaitProcessWideKey without timeout.
      Thread 3 calls SignalProcessWideKey
      - Thread 2 acquires the lock and awakens.
      - Thread 1 can't acquire the lock and is put to sleep with the lock owner being Thread 2.
      Thread 1's timeout expires, with the lock owner still being set to Thread 2.
      9cd87a63
  16. May 31, 2018
  17. May 30, 2018
  18. May 26, 2018
  19. May 20, 2018
  20. May 19, 2018
  21. May 17, 2018
Loading