Back to index

nux  3.0.0
Classes | Namespaces | Defines | Typedefs | Enumerations
ThreadGNU.h File Reference
#include "ObjectType.h"

Go to the source code of this file.

Classes

class  nux::NThreadSafeCounter
class  nux::NCriticalSection
class  nux::NScopeLock
 Scope Lock class. More...
class  nux::NThreadLocalStorage
class  nux::NThread
class  nux::NThread::NThreadContext
 Info: Thread Context Inner Class. More...

Namespaces

namespace  nux
 The Writer singleton is responsible for controlling where the logging message go.

Defines

#define inlDeclareThreadLocalStorage(type, index, name)
#define inlRegisterThreadLocalIndex(index, name, shutdownCallback)
#define inlUnRegisterThreadLocalIndex(name)   nuxVerifyExpr(nux::NThreadLocalStorage::UnRegisterTLS(ThreadLocalStorageDef##name::Index))
#define inlGetThreadLocalStorage(name)   GetTLS_##name()
#define inlSetThreadLocalStorage(name, value)   SetTLS_##name(value)
#define nuxAssertInsideThread(threadtype)   ((void) 0)
#define nuxAssertInsideThread2(threadtype1, threadtype2)   ((void) 0)
#define nuxAssertNotInsideThread(threadtype)   ((void) 0)

Typedefs

typedef void *(* nux::ThreadRoutineFunc )(void *)

Enumerations

enum  nux::ThreadState {
  nux::THREADINIT, nux::THREADRUNNING, nux::THREADSUSPENDED, nux::THREADSTOP,
  nux::THREAD_START_ERROR, nux::THREAD_STOP_ERROR, nux::THREAD_SUSPEND_ERROR, nux::THREAD_RESUME_ERROR
}
enum  nux::ThreadWaitTimeout { nux::THREAD_WAIT_TIMEOUT_NONE = 0, nux::THREAD_WAIT_TIMEOUT_FOREVER = 0xFFFFFFFF }
enum  nux::ThreadWaitResult { nux::THREAD_WAIT_RESULT_COMPLETED = 0, nux::THREAD_WAIT_RESULT_ABANDONED = 1, nux::THREAD_WAIT_RESULT_TIMEOUT = 2, nux::THREAD_WAIT_RESULT_FAILED = 3 }

Define Documentation

#define inlDeclareThreadLocalStorage (   type,
  index,
  name 
)
Value:
struct        ThreadLocalStorageDef##name { enum Const { Index = index}; };\
inline        type GetTLS_##name() { return nux::NThreadLocalStorage::GetData<type>(ThreadLocalStorageDef##name::Index); }\
inline        void SetTLS_##name(type value) { nux::NThreadLocalStorage::SetData<type>(ThreadLocalStorageDef##name::Index, value); }

Definition at line 239 of file ThreadGNU.h.

#define inlGetThreadLocalStorage (   name)    GetTLS_##name()

Definition at line 252 of file ThreadGNU.h.

#define inlRegisterThreadLocalIndex (   index,
  name,
  shutdownCallback 
)
Value:
nuxVerifyExpr(index == ThreadLocalStorageDef##name::Index); \
    nuxVerifyExpr(nux::NThreadLocalStorage::RegisterTLS(index, shutdownCallback))

Definition at line 244 of file ThreadGNU.h.

#define inlSetThreadLocalStorage (   name,
  value 
)    SetTLS_##name(value)

Definition at line 253 of file ThreadGNU.h.

#define inlUnRegisterThreadLocalIndex (   name)    nuxVerifyExpr(nux::NThreadLocalStorage::UnRegisterTLS(ThreadLocalStorageDef##name::Index))

Definition at line 248 of file ThreadGNU.h.

#define nuxAssertInsideThread (   threadtype)    ((void) 0)

Definition at line 260 of file ThreadGNU.h.

#define nuxAssertInsideThread2 (   threadtype1,
  threadtype2 
)    ((void) 0)

Definition at line 261 of file ThreadGNU.h.

#define nuxAssertNotInsideThread (   threadtype)    ((void) 0)

Definition at line 262 of file ThreadGNU.h.