Added getters for thread wait objects/object groups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30419 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-04-26 01:27:44 +00:00
parent fb2f23e0dc
commit 055d771c51
2 changed files with 33 additions and 0 deletions

View File

@ -82,6 +82,20 @@ Model::ThreadWaitObjectGroup::~ThreadWaitObjectGroup()
}
bool
Model::ThreadWaitObjectGroup::GetThreadWaitObjects(
BObjectList<ThreadWaitObject>& objects)
{
ThreadWaitObjectList::Iterator it = fWaitObjects.GetIterator();
while (ThreadWaitObject* object = it.Next()) {
if (!objects.AddItem(object))
return false;
}
return true;
}
// #pragma mark - Team

View File

@ -176,6 +176,9 @@ public:
inline void AddWaitObject(
ThreadWaitObject* threadWaitObject);
bool GetThreadWaitObjects(
BObjectList<ThreadWaitObject>& objects);
static inline int CompareByTypeObject(
const ThreadWaitObjectGroup* a,
const ThreadWaitObjectGroup* b);
@ -249,6 +252,8 @@ public:
ThreadWaitObjectGroup* ThreadWaitObjectGroupFor(uint32 type,
addr_t object) const;
inline int32 CountThreadWaitObjectGroups() const;
inline ThreadWaitObjectGroup* ThreadWaitObjectGroupAt(int32 index) const;
inline void SetDeletionTime(bigtime_t time);
@ -657,6 +662,20 @@ Model::Thread::UnspecifiedWaitTime() const
}
int32
Model::Thread::CountThreadWaitObjectGroups() const
{
return fWaitObjectGroups.CountItems();
}
Model::ThreadWaitObjectGroup*
Model::Thread::ThreadWaitObjectGroupAt(int32 index) const
{
return fWaitObjectGroups.ItemAt(index);
}
void
Model::Thread::SetDeletionTime(bigtime_t time)
{