OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
OgreThreads.h File Reference
#include "OgreSharedPtr.h"
#include <pthread.h>

Classes

struct  Ogre::DeleteOnDestructor< T >
 
class  Ogre::ThreadHandle
 
class  Ogre::Threads
 

Namespaces

 Ogre
 bswapNN may be defined as macros in <sys/endian.h> or <sys/bswap.h>
 

Macros

#define OGRE_THREAD_CALL_CONVENTION
 
#define OGRE_TLS_INVALID_HANDLE   static_cast<Ogre::TlsHandle>( 0xFFFFFFFF )
 
#define THREAD_DECLARE(threadFunction)
 See Threads::CreateThread for an example on how to use. More...
 
#define THREAD_GET(threadFunction)   threadFunction##_internal
 

Typedefs

typedef void *OGRE_THREAD_CALL_CONVENTIONOgre::THREAD_ENTRY_POINT(void *lpThreadParameter)
 
typedef SharedPtr< ThreadHandle > Ogre::ThreadHandlePtr
 
typedef StdVector< ThreadHandlePtr > Ogre::ThreadHandleVec
 
typedef pthread_key_t Ogre::TlsHandle
 

Macro Definition Documentation

◆ OGRE_THREAD_CALL_CONVENTION

#define OGRE_THREAD_CALL_CONVENTION

◆ OGRE_TLS_INVALID_HANDLE

#define OGRE_TLS_INVALID_HANDLE   static_cast<Ogre::TlsHandle>( 0xFFFFFFFF )

◆ THREAD_DECLARE

#define THREAD_DECLARE (   threadFunction)
Value:
void *OGRE_THREAD_CALL_CONVENTION threadFunction##_internal( void *argName ) \
{ \
unsigned long retVal = 0; \
Ogre::ThreadHandle *threadHandle( reinterpret_cast<Ogre::ThreadHandle *>( argName ) ); \
Ogre::DeleteOnDestructor<Ogre::ThreadHandle> container( threadHandle ); \
threadHandle->_setOsHandleToSelf(); \
retVal = threadFunction( threadHandle ); \
return (void *)retVal; \
}
#define OGRE_THREAD_CALL_CONVENTION
Definition: OgreThreads.h:41
Definition: OgreThreads.h:95

See Threads::CreateThread for an example on how to use.

◆ THREAD_GET

#define THREAD_GET (   threadFunction)    threadFunction##_internal