From 09ef507084217327473c24dfd54dbe31686834ed Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Dec 2006 11:34:37 +0000 Subject: [PATCH] add RageThread copy ctor, RageEvent::WaitTimeoutSupported --- stepmania/src/RageThreads.cpp | 12 ++++++++++++ stepmania/src/RageThreads.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index e2ec86c6e3..4bd00b1a0e 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -217,6 +217,13 @@ RageThread::RageThread() m_sName = "unnamed"; } +RageThread::RageThread( const RageThread &cpy ) +{ + /* Copying a thread does not start the copy. */ + m_pSlot = NULL; + m_sName = cpy.m_sName; +} + RageThread::~RageThread() { if( m_pSlot != NULL ) @@ -720,6 +727,11 @@ void RageEvent::Broadcast() m_pEvent->Broadcast(); } +bool RageEvent::WaitTimeoutSupported() const +{ + return m_pEvent->WaitTimeoutSupported(); +} + RageSemaphore::RageSemaphore( RString sName, int iInitialValue ): m_sName( sName ) { diff --git a/stepmania/src/RageThreads.h b/stepmania/src/RageThreads.h index 2be17328c7..dc0def2805 100644 --- a/stepmania/src/RageThreads.h +++ b/stepmania/src/RageThreads.h @@ -9,6 +9,7 @@ class RageThread { public: RageThread(); + RageThread( const RageThread &cpy ); ~RageThread(); void SetName( const RString &n ) { m_sName = n; } @@ -140,6 +141,7 @@ public: bool Wait( RageTimer *pTimeout = NULL ); void Signal(); void Broadcast(); + bool WaitTimeoutSupported() const; private: EventImpl *m_pEvent;