Geant4  10.02
G4Threading.hh File Reference
#include "G4Types.hh"
#include <unistd.h>
+ Include dependency graph for G4Threading.hh:

Go to the source code of this file.

Namespaces

 G4Threading
 

Macros

#define G4THREADSLEEP(tick)   { sleep(tick); }
 
#define G4MUTEX_INITIALIZER   1
 
#define G4MUTEXINIT(mutex)   ;;
 
#define G4MUTEXDESTROY(mutex)   ;;
 
#define G4MUTEXLOCK   fake_mutex_lock_unlock
 
#define G4MUTEXUNLOCK   fake_mutex_lock_unlock
 
#define G4THREADCREATE(worker, func, arg)   ;;
 
#define G4THREADJOIN(worker)   ;;
 
#define G4THREADSELF(nothing)   G4Thread(nothing);
 
#define G4CONDITION_INITIALIZER   1
 
#define G4CONDITIONWAIT(cond, mutex)   ;;
 
#define G4CONDTIONBROADCAST(cond)   ;;
 

Typedefs

typedef G4int G4Mutex
 
typedef G4int G4Thread
 
typedef void * G4ThreadFunReturnType
 
typedef void * G4ThreadFunArgType
 
typedef G4int(* thread_lock )(G4Mutex *)
 
typedef G4int(* thread_unlock )(G4Mutex *)
 
typedef G4int G4Pid_t
 
typedef G4int G4Condition
 

Enumerations

enum  { G4Threading::SEQUENTIAL_ID = -2, G4Threading::MASTER_ID = -1, G4Threading::WORKER_ID = 0, G4Threading::GENERICTHREAD_ID = -1000 }
 

Functions

G4int fake_mutex_lock_unlock (G4Mutex *)
 
G4Pid_t G4Threading::G4GetPidId ()
 
G4int G4Threading::G4GetNumberOfCores ()
 
G4int G4Threading::G4GetThreadId ()
 
G4bool G4Threading::IsWorkerThread ()
 
G4bool G4Threading::IsMasterThread ()
 
void G4Threading::G4SetThreadId (G4int aNewValue)
 
G4bool G4Threading::G4SetPinAffinity (G4int idx, G4Thread &at)
 
void G4Threading::SetMultithreadedApplication (G4bool value)
 
G4bool G4Threading::IsMultithreadedApplication ()
 

Macro Definition Documentation

#define G4CONDITION_INITIALIZER   1

Definition at line 190 of file G4Threading.hh.

#define G4MUTEX_INITIALIZER   1

Definition at line 175 of file G4Threading.hh.

Referenced by TSRun::RecordEvent().

#define G4THREADCREATE (   worker,
  func,
  arg 
)    ;;

Definition at line 181 of file G4Threading.hh.

Referenced by G4VisManager::BeginOfRun(), and main().

#define G4THREADJOIN (   worker)    ;;

Definition at line 182 of file G4Threading.hh.

Referenced by G4VisManager::EndOfRun(), and main().

#define G4THREADSELF (   nothing)    G4Thread(nothing);

Definition at line 183 of file G4Threading.hh.

Referenced by G4WorkerThread::SetPinAffinity().

#define G4THREADSLEEP (   tick)    { sleep(tick); }

Definition at line 49 of file G4Threading.hh.

Referenced by G4VisManager::EndOfEvent().

Typedef Documentation

typedef G4int G4Condition

Definition at line 189 of file G4Threading.hh.

typedef G4int G4Mutex

Definition at line 173 of file G4Threading.hh.

typedef G4int G4Pid_t

Definition at line 188 of file G4Threading.hh.

typedef G4int G4Thread

Definition at line 174 of file G4Threading.hh.

typedef void* G4ThreadFunArgType

Definition at line 185 of file G4Threading.hh.

typedef void* G4ThreadFunReturnType

Definition at line 184 of file G4Threading.hh.

typedef G4int(* thread_lock)(G4Mutex *)

Definition at line 186 of file G4Threading.hh.

typedef G4int(* thread_unlock)(G4Mutex *)

Definition at line 187 of file G4Threading.hh.

Function Documentation

G4int fake_mutex_lock_unlock ( G4Mutex )

Definition at line 116 of file G4Threading.cc.