mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
ThreadEvent: Handle getting scheduled off a thread.
This commit is contained in:
parent
97cce6ccfe
commit
4fc12cdd29
@ -99,7 +99,7 @@ struct ThreadQueueList {
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline SceUID peek_first(u32 priority) {
|
||||
inline SceUID peek_first() {
|
||||
Queue *cur = first;
|
||||
while (cur != invalid()) {
|
||||
if (cur->size() > 0)
|
||||
|
@ -3057,7 +3057,7 @@ static bool __CanExecuteCallbackNow(Thread *thread) {
|
||||
|
||||
void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId)
|
||||
{
|
||||
if (thread->isStopped()) {
|
||||
if (!thread || thread->isStopped()) {
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Running mipscall on dormant thread");
|
||||
}
|
||||
|
||||
@ -3591,8 +3591,8 @@ KernelObject *__KernelThreadEventHandlerObject() {
|
||||
|
||||
void __KernelThreadTriggerEvent(const ThreadEventHandlerList &handlers, SceUID threadID, ThreadEventType type) {
|
||||
Thread *thread = __GetCurrentThread();
|
||||
if (thread->isStopped()) {
|
||||
SceUID nextThreadID = threadReadyQueue.peek_first(thread->nt.currentPriority);
|
||||
if (!thread || thread->isStopped()) {
|
||||
SceUID nextThreadID = threadReadyQueue.peek_first();
|
||||
thread = kernelObjects.GetFast<Thread>(nextThreadID);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user