added isCurrentThread() member func

This commit is contained in:
Jeff Hill
2000-08-25 01:35:06 +00:00
parent ce193d5c57
commit e33dab4299
2 changed files with 5 additions and 1 deletions

View File

@@ -47,3 +47,7 @@ void osiThread::start ()
this->begin.signal ();
}
bool osiThread::isCurrentThread () const
{
return ( threadGetIdSelf () == this->id );
}

View File

@@ -112,7 +112,7 @@ public:
void setPriority (unsigned);
bool priorityIsEqual (const osiThread &otherThread) const;
bool isSuspended () const;
bool isCurrentThread () const;
bool operator == (const osiThread &rhs) const;
/* these operate on the current thread */