diff options
| author | 2015-05-19 20:24:30 -0400 | |
|---|---|---|
| committer | 2015-05-20 18:05:47 -0400 | |
| commit | 0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f (patch) | |
| tree | bce96a583e8069dc22e508df62de6cd03f394efc /src/core/hle/svc.cpp | |
| parent | Merge pull request #783 from jroweboy/cond-wait (diff) | |
| download | yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.gz yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.xz yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.zip | |
Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 22adf9595..347d241f9 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -290,9 +290,6 @@ static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 val | |||
| 290 | auto res = arbiter->ArbitrateAddress(static_cast<Kernel::ArbitrationType>(type), | 290 | auto res = arbiter->ArbitrateAddress(static_cast<Kernel::ArbitrationType>(type), |
| 291 | address, value, nanoseconds); | 291 | address, value, nanoseconds); |
| 292 | 292 | ||
| 293 | if (res == RESULT_SUCCESS) | ||
| 294 | HLE::Reschedule(__func__); | ||
| 295 | |||
| 296 | return res; | 293 | return res; |
| 297 | } | 294 | } |
| 298 | 295 | ||
| @@ -399,8 +396,6 @@ static ResultCode CreateThread(Handle* out_handle, s32 priority, u32 entry_point | |||
| 399 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, | 396 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, |
| 400 | name.c_str(), arg, stack_top, priority, processor_id, *out_handle); | 397 | name.c_str(), arg, stack_top, priority, processor_id, *out_handle); |
| 401 | 398 | ||
| 402 | HLE::Reschedule(__func__); | ||
| 403 | |||
| 404 | return RESULT_SUCCESS; | 399 | return RESULT_SUCCESS; |
| 405 | } | 400 | } |
| 406 | 401 | ||
| @@ -409,7 +404,6 @@ static void ExitThread() { | |||
| 409 | LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); | 404 | LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); |
| 410 | 405 | ||
| 411 | Kernel::GetCurrentThread()->Stop(); | 406 | Kernel::GetCurrentThread()->Stop(); |
| 412 | HLE::Reschedule(__func__); | ||
| 413 | } | 407 | } |
| 414 | 408 | ||
| 415 | /// Gets the priority for the specified thread | 409 | /// Gets the priority for the specified thread |
| @@ -439,11 +433,9 @@ static ResultCode CreateMutex(Handle* out_handle, u32 initial_locked) { | |||
| 439 | SharedPtr<Mutex> mutex = Mutex::Create(initial_locked != 0); | 433 | SharedPtr<Mutex> mutex = Mutex::Create(initial_locked != 0); |
| 440 | CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(mutex))); | 434 | CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(mutex))); |
| 441 | 435 | ||
| 442 | HLE::Reschedule(__func__); | ||
| 443 | |||
| 444 | LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X", | 436 | LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X", |
| 445 | initial_locked ? "true" : "false", *out_handle); | 437 | initial_locked ? "true" : "false", *out_handle); |
| 446 | 438 | ||
| 447 | return RESULT_SUCCESS; | 439 | return RESULT_SUCCESS; |
| 448 | } | 440 | } |
| 449 | 441 | ||
| @@ -459,8 +451,6 @@ static ResultCode ReleaseMutex(Handle handle) { | |||
| 459 | 451 | ||
| 460 | mutex->Release(); | 452 | mutex->Release(); |
| 461 | 453 | ||
| 462 | HLE::Reschedule(__func__); | ||
| 463 | |||
| 464 | return RESULT_SUCCESS; | 454 | return RESULT_SUCCESS; |
| 465 | } | 455 | } |
| 466 | 456 | ||
| @@ -528,8 +518,6 @@ static ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) | |||
| 528 | 518 | ||
| 529 | CASCADE_RESULT(*count, semaphore->Release(release_count)); | 519 | CASCADE_RESULT(*count, semaphore->Release(release_count)); |
| 530 | 520 | ||
| 531 | HLE::Reschedule(__func__); | ||
| 532 | |||
| 533 | return RESULT_SUCCESS; | 521 | return RESULT_SUCCESS; |
| 534 | } | 522 | } |
| 535 | 523 | ||
| @@ -568,7 +556,7 @@ static ResultCode SignalEvent(Handle handle) { | |||
| 568 | return ERR_INVALID_HANDLE; | 556 | return ERR_INVALID_HANDLE; |
| 569 | 557 | ||
| 570 | evt->Signal(); | 558 | evt->Signal(); |
| 571 | HLE::Reschedule(__func__); | 559 | |
| 572 | return RESULT_SUCCESS; | 560 | return RESULT_SUCCESS; |
| 573 | } | 561 | } |
| 574 | 562 | ||
| @@ -623,8 +611,6 @@ static ResultCode SetTimer(Handle handle, s64 initial, s64 interval) { | |||
| 623 | 611 | ||
| 624 | timer->Set(initial, interval); | 612 | timer->Set(initial, interval); |
| 625 | 613 | ||
| 626 | HLE::Reschedule(__func__); | ||
| 627 | |||
| 628 | return RESULT_SUCCESS; | 614 | return RESULT_SUCCESS; |
| 629 | } | 615 | } |
| 630 | 616 | ||
| @@ -640,8 +626,6 @@ static ResultCode CancelTimer(Handle handle) { | |||
| 640 | 626 | ||
| 641 | timer->Cancel(); | 627 | timer->Cancel(); |
| 642 | 628 | ||
| 643 | HLE::Reschedule(__func__); | ||
| 644 | |||
| 645 | return RESULT_SUCCESS; | 629 | return RESULT_SUCCESS; |
| 646 | } | 630 | } |
| 647 | 631 | ||
| @@ -654,8 +638,6 @@ static void SleepThread(s64 nanoseconds) { | |||
| 654 | 638 | ||
| 655 | // Create an event to wake the thread up after the specified nanosecond delay has passed | 639 | // Create an event to wake the thread up after the specified nanosecond delay has passed |
| 656 | Kernel::GetCurrentThread()->WakeAfterDelay(nanoseconds); | 640 | Kernel::GetCurrentThread()->WakeAfterDelay(nanoseconds); |
| 657 | |||
| 658 | HLE::Reschedule(__func__); | ||
| 659 | } | 641 | } |
| 660 | 642 | ||
| 661 | /// This returns the total CPU ticks elapsed since the CPU was powered-on | 643 | /// This returns the total CPU ticks elapsed since the CPU was powered-on |