mirror of
https://github.com/libretro/Play-.git
synced 2024-11-27 18:50:28 +00:00
Display delayed threads in IOP thread view.
This commit is contained in:
parent
6fb78889a7
commit
bbc27c677e
@ -11,6 +11,7 @@
|
||||
#include <vector>
|
||||
#include "xml/FilteringNodeIterator.h"
|
||||
#include "../StructCollectionStateFile.h"
|
||||
#include "string_format.h"
|
||||
|
||||
#ifdef _IOP_EMULATE_MODULES
|
||||
#include "Iop_Cdvdfsv.h"
|
||||
@ -1575,7 +1576,7 @@ uint32 CIopBios::GetNextReadyThread()
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint64 CIopBios::GetCurrentTime()
|
||||
uint64 CIopBios::GetCurrentTime() const
|
||||
{
|
||||
return CurrentTime();
|
||||
}
|
||||
@ -3133,13 +3134,22 @@ BiosDebugThreadInfoArray CIopBios::GetThreadsDebugInfo() const
|
||||
threadInfo.sp = thread->context.gpr[CMIPS::SP];
|
||||
}
|
||||
|
||||
int64 deltaTime = thread->nextActivateTime - GetCurrentTime();
|
||||
|
||||
switch(thread->status)
|
||||
{
|
||||
case THREAD_STATUS_DORMANT:
|
||||
threadInfo.stateDescription = "Dormant";
|
||||
break;
|
||||
case THREAD_STATUS_RUNNING:
|
||||
threadInfo.stateDescription = "Running";
|
||||
if(deltaTime <= 0)
|
||||
{
|
||||
threadInfo.stateDescription = "Running";
|
||||
}
|
||||
else
|
||||
{
|
||||
threadInfo.stateDescription = string_format("Delayed (%ld ticks)", deltaTime);
|
||||
}
|
||||
break;
|
||||
case THREAD_STATUS_SLEEPING:
|
||||
threadInfo.stateDescription = "Sleeping";
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
void Reschedule();
|
||||
|
||||
void CountTicks(uint32) override;
|
||||
uint64 GetCurrentTime();
|
||||
uint64 GetCurrentTime() const;
|
||||
uint64 MilliSecToClock(uint32);
|
||||
uint64 MicroSecToClock(uint32);
|
||||
uint64 ClockToMicroSec(uint64);
|
||||
|
Loading…
Reference in New Issue
Block a user