Skip to content
Snippets Groups Projects
  1. Nov 22, 2018
  2. Nov 19, 2018
  3. Nov 14, 2018
  4. Oct 26, 2018
    • Lioncash's avatar
      svc: Implement svcGetInfo command 0xF0000002 · 6594853e
      Lioncash authored
      This retrieves:
      
      if (curr_thread == handle_thread) {
         result = total_thread_ticks + (hardware_tick_count - last_context_switch_ticks);
      } else if (curr_thread == handle_thread && sub_id == current_core_index) {
         result = hardware_tick_count - last_context_switch_ticks;
      }
      6594853e
  5. Oct 10, 2018
    • Lioncash's avatar
      kernel/thread: Use a regular pointer for the owner/current process · 5c040859
      Lioncash authored
      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).
      5c040859
  6. Oct 05, 2018
    • balika011's avatar
      thread: Make the scheduler pointer a regular pointer · 1a5d6de0
      balika011 authored
      Conceptually, it doesn't make sense for a thread to be able to persist
      the lifetime of a scheduler. A scheduler should be taking care of the
      threads; the threads should not be taking care of the scheduler.
      
      If the threads outlive the scheduler (or we simply don't actually
      terminate/shutdown the threads), then it should be considered a bug
      that we need to fix.
      
      Attributing this to balika011, as they opened #1317 to attempt to fix
      this in a similar way, but my refactoring of the kernel code caused
      quite a few conflicts.
      1a5d6de0
  7. Oct 04, 2018
    • Lioncash's avatar
      kernel/thread: Make all instance variables private · baed7e1f
      Lioncash authored
      Many of the member variables of the thread class aren't even used
      outside of the class itself, so there's no need to make those variables
      public. This change follows in the steps of the previous changes that
      made other kernel types' members private.
      
      The main motivation behind this is that the Thread class will likely
      change in the future as emulation becomes more accurate, and letting
      random bits of the emulator access data members of the Thread class
      directly makes it a pain to shuffle around and/or modify internals.
      Having all data members public like this also makes it difficult to
      reason about certain bits of behavior without first verifying what parts
      of the core actually use them.
      
      Everything being public also generally follows the tendency for changes
      to be introduced in completely different translation units that would
      otherwise be better introduced as an addition to the Thread class'
      public interface.
      baed7e1f
  8. Sep 21, 2018
  9. Sep 15, 2018
  10. Sep 13, 2018
  11. Aug 29, 2018
    • Lioncash's avatar
      kernel: Eliminate kernel global state · 0cbcd6ec
      Lioncash authored
      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.
      0cbcd6ec
  12. Aug 25, 2018
  13. Aug 04, 2018
  14. Aug 02, 2018
  15. Aug 01, 2018
  16. Jul 31, 2018
    • Lioncash's avatar
      kernel: Remove unnecessary includes · a2304fad
      Lioncash authored
      Removes unnecessary direct dependencies in some headers and also gets
      rid of indirect dependencies that were being relied on to be included.
      a2304fad
  17. Jul 21, 2018
  18. Jul 20, 2018
  19. Jun 22, 2018
  20. Jun 21, 2018
  21. May 10, 2018
  22. Apr 23, 2018
    • Subv's avatar
      Kernel: Implemented mutex priority inheritance. · 46572d02
      Subv authored
      Verified with a hwtest and implemented based on reverse engineering.
      
      Thread A's priority will get bumped to the highest priority among all the threads that are waiting for a mutex that A holds.
      Once A releases the mutex and ownership is transferred to B, A's priority will return to normal and B's priority will be bumped.
      46572d02
  23. Apr 21, 2018
  24. Mar 19, 2018
  25. Feb 18, 2018
  26. Jan 10, 2018
  27. Jan 09, 2018
  28. Dec 31, 2017
Loading