Add StopRequestPending field/accessors to Thread.

This commit is contained in:
Rene Gollent
2013-07-04 07:34:41 -04:00
parent d376554674
commit cc6b4a3cb1
2 changed files with 13 additions and 0 deletions
+8
View File
@@ -19,6 +19,7 @@ Thread::Thread(Team* team, thread_id threadID)
fID(threadID), fID(threadID),
fState(THREAD_STATE_UNKNOWN), fState(THREAD_STATE_UNKNOWN),
fReturnValueInfos(NULL), fReturnValueInfos(NULL),
fStopRequestPending(false),
fStoppedReason(THREAD_STOPPED_UNKNOWN), fStoppedReason(THREAD_STOPPED_UNKNOWN),
fCpuState(NULL), fCpuState(NULL),
fStackTrace(NULL) fStackTrace(NULL)
@@ -78,6 +79,7 @@ Thread::SetState(uint32 state, uint32 reason, const BString& info)
SetCpuState(NULL); SetCpuState(NULL);
SetStackTrace(NULL); SetStackTrace(NULL);
ClearReturnValueInfos(); ClearReturnValueInfos();
fStopRequestPending = false;
} }
fTeam->NotifyThreadStateChanged(this); fTeam->NotifyThreadStateChanged(this);
@@ -119,6 +121,12 @@ Thread::SetStackTrace(StackTrace* trace)
fTeam->NotifyThreadStackTraceChanged(this); fTeam->NotifyThreadStackTraceChanged(this);
} }
void
Thread::SetStopRequestPending()
{
fStopRequestPending = true;
}
status_t status_t
Thread::AddReturnValueInfo(ReturnValueInfo* info) Thread::AddReturnValueInfo(ReturnValueInfo* info)
+5
View File
@@ -71,6 +71,10 @@ public:
StackTrace* GetStackTrace() const { return fStackTrace; } StackTrace* GetStackTrace() const { return fStackTrace; }
void SetStackTrace(StackTrace* trace); void SetStackTrace(StackTrace* trace);
bool StopRequestPending() const
{ return fStopRequestPending; }
void SetStopRequestPending();
ReturnValueInfoList* ReturnValueInfoList*
ReturnValueInfos() const ReturnValueInfos() const
{ return fReturnValueInfos; } { return fReturnValueInfos; }
@@ -84,6 +88,7 @@ private:
uint32 fState; uint32 fState;
ReturnValueInfoList* ReturnValueInfoList*
fReturnValueInfos; fReturnValueInfos;
bool fStopRequestPending;
uint32 fStoppedReason; uint32 fStoppedReason;
BString fStoppedReasonInfo; BString fStoppedReasonInfo;
CpuState* fCpuState; CpuState* fCpuState;