CoreTiming: Reworked CoreTiming (#3119)

* CoreTiming: New CoreTiming; Add Test for CoreTiming
This commit is contained in:
B3n30 2017-11-25 14:56:57 +01:00 committed by GitHub
parent b7cf793814
commit e9a95b2e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 678 additions and 593 deletions

View file

@ -27,7 +27,7 @@
namespace Kernel {
/// Event type for the thread wake up event
static int ThreadWakeupEventType;
static CoreTiming::EventType* ThreadWakeupEventType = nullptr;
bool Thread::ShouldWait(Thread* thread) const {
return status != THREADSTATUS_DEAD;
@ -216,8 +216,7 @@ void Thread::WakeAfterDelay(s64 nanoseconds) {
if (nanoseconds == -1)
return;
u64 microseconds = nanoseconds / 1000;
CoreTiming::ScheduleEvent(usToCycles(microseconds), ThreadWakeupEventType, callback_handle);
CoreTiming::ScheduleEvent(nsToCycles(nanoseconds), ThreadWakeupEventType, callback_handle);
}
void Thread::ResumeFromWait() {