Back to revision 1109. Accidentally checked in more files than I intended.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1111 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-20 23:19:14 +00:00
parent 16094ffe39
commit ca6a94ac97
16 changed files with 344 additions and 450 deletions

View file

@ -20,7 +20,7 @@
#include <assert.h>
//#include <process.h>
#include <process.h>
#if !defined( _MSC_VER )
#include <unistd.h> // needed for the usleep function.
#endif
@ -86,13 +86,11 @@ Thread::~Thread( void )
bool Thread::WaitForThread( void ) volatile
{
assert( IsValid( m_owner ) );
const volatile Thread * current = Thread::GetCurrentThread();
if ( this == current )
return false;
if ( m_status == Thread::Dead )
return false;
while ( this->m_status == Thread::Active )
{
// Call the wait policy.
@ -102,8 +100,6 @@ bool Thread::WaitForThread( void ) volatile
::usleep( 1000 );
#endif
}
m_status = Thread::Idle;
return true;
}