MerryMage
44646e2ea0
core_timing: Split off utility functions into core_timing_util
8 years ago
James Rowe
638956aa81
Rename logging macro back to LOG_*
8 years ago
Lioncash
0197e28cc9
core_timing: Namespace all functions and constants in core_timing's header
All of these variables and functions are related to timings and should be within the namespace.
8 years ago
Lioncash
40dee76c57
kernel: Migrate logging macros to fmt-compatible ones
8 years ago
James Rowe
096be16636
Format: Run the new clang format on everything
8 years ago
B3n30
82151d407d
CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119 )
* CoreTiming: New CoreTiming; Add Test for CoreTiming
8 years ago
Yuri Kunde Schlesner
723dc644fa
ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
9 years ago
Yuri Kunde Schlesner
be031989ee
Kernel: Move HandleTable to a separate file
9 years ago
wwylele
85ba60d5ec
Timer: restore missing signaled=true from #2421
9 years ago
B3n30
dcf115778a
Fix log entry in timer::signal ( #2600 )
9 years ago
Subv
029a11030e
Timers: Immediately signal the timer if it was started with an initial value of 0.
9 years ago
Subv
e52ca85711
Kernel: Implemented Pulse event and timers.
Closes #1904
9 years ago
Subv
e6a7723f2f
Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.
This will be useful when implementing mutex priority inheritance.
9 years ago
Subv
8634b8cb83
Threading: Reworked the way our scheduler works.
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then.
The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback.
This new implementation is based off reverse-engineering of the real kernel.
See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
9 years ago
Subv
4ab8692475
Kernel/Events: Log an error when trying to create Pulse events and timers.
Related to #1904
9 years ago
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
ebdae19fd2
Remove empty newlines in #include blocks.
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
9 years ago
Lioncash
12e92f17de
svc: Make ResetType an enum class
10 years ago
Subv
6cccc36505
HLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered.
Closes #1139
10 years ago
Lioncash
751fbfdcc3
general: Silence some warnings when using clang
10 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
11 years ago
bunnei
0b7d2941cf
Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.
11 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
11 years ago
bunnei
c7dc799e19
Kernel: Properly initialize and shutdown all modules.
11 years ago
Emmanuel Gil Peyrot
0d69b2f7bd
Kernel: Use the correct format string for u64 hex.
11 years ago
Subv
8e2b248e05
Build: Fixed some warnings
11 years ago
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
11 years ago
Yuri Kunde Schlesner
88a4a808c6
Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's
handle table.
11 years ago
Yuri Kunde Schlesner
7725256f64
Explicitly instantiate constructors/destructors for Kernel objects
This should speed up compile times a bit, as well as enable more liberal
use of forward declarations. (Due to SharedPtr not trying to emit the
destructor anymore.)
11 years ago
Yuri Kunde Schlesner
a9b86db3cf
Kernel: Use separate Handle tables for CoreTiming userdata
This is to support the removal of GetHandle soon
11 years ago
Yuri Kunde Schlesner
ec9c773251
Kernel: Remove previous scheduled event when a Timer is re-Set
11 years ago
Yuri Kunde Schlesner
ad80ff1e32
Kernel: Convert Timer to (mostly) not use Handles
11 years ago
Yuri Kunde Schlesner
9a345de2bd
Kernel: Remove useless/duplicated comments; mark functions static
11 years ago
bunnei
f09806aed2
Kernel: Renamed some functions for clarity.
- ReleaseNextThread->WakeupNextThread
- ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
11 years ago
bunnei
15b6a4d9ad
Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.
11 years ago
bunnei
c68eb15695
WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.
11 years ago
bunnei
e5a9f1c644
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
11 years ago
bunnei
6643673f28
WaitSynchronizationN: Refactor to fix several bugs
- Separate wait checking from waiting the current thread
- Resume thread when wait_all=true only if all objects are available at once
- Set output to correct wait object index when there are duplicate handles
11 years ago
bunnei
aa01c57ae9
Kernel: Separate WaitSynchronization into Wait and Acquire methods.
11 years ago
bunnei
7faf2d8e06
WaitSynchronizationN: Implement return values
11 years ago
bunnei
c22bac6398
Kernel: Added WaitObject and changed "waitable" objects inherit from it.
11 years ago
Yuri Kunde Schlesner
8ad41775cc
Kernel: Start using boost::intrusive_ptr for lifetime management
11 years ago
Yuri Kunde Schlesner
9bf8462b96
Thread: Reduce use of Handles and move some funcs to inside the class.
11 years ago
Subv
07044651ef
SVC: Implemented the Timer service calls.
11 years ago