Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4Threading.hh File Reference
#include "G4Types.hh"
#include <unistd.h>
Include dependency graph for G4Threading.hh:
This graph shows which files directly or indirectly include this file:

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)   { ++(*cond); ++(*mutex); }
 
#define G4CONDITIONBROADCAST(cond)   { ++(*cond); }
 

Typedefs

typedef G4int G4Mutex
 
typedef G4int G4Thread
 
typedef voidG4ThreadFunReturnType
 
typedef voidG4ThreadFunArgType
 
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 ()
 
int G4Threading::WorkerThreadLeavesPool ()
 
int G4Threading::WorkerThreadJoinsPool ()
 
G4int G4Threading::GetNumberOfRunningWorkerThreads ()
 

Macro Definition Documentation

#define G4CONDITION_INITIALIZER   1

Definition at line 190 of file G4Threading.hh.

#define G4CONDITIONBROADCAST (   cond)    { ++(*cond); }

Definition at line 192 of file G4Threading.hh.

#define G4CONDITIONWAIT (   cond,
  mutex 
)    { ++(*cond); ++(*mutex); }

Definition at line 191 of file G4Threading.hh.

#define G4MUTEX_INITIALIZER   1

Definition at line 175 of file G4Threading.hh.

#define G4MUTEXDESTROY (   mutex)    ;;

Definition at line 178 of file G4Threading.hh.

#define G4MUTEXINIT (   mutex)    ;;

Definition at line 177 of file G4Threading.hh.

#define G4MUTEXLOCK   fake_mutex_lock_unlock

Definition at line 179 of file G4Threading.hh.

#define G4MUTEXUNLOCK   fake_mutex_lock_unlock

Definition at line 180 of file G4Threading.hh.

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

Definition at line 181 of file G4Threading.hh.

#define G4THREADJOIN (   worker)    ;;

Definition at line 182 of file G4Threading.hh.

#define G4THREADSELF (   nothing)    G4Thread(nothing);

Definition at line 183 of file G4Threading.hh.

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

Definition at line 49 of file G4Threading.hh.

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.

Definition at line 185 of file G4Threading.hh.

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 132 of file G4Threading.cc.

132 { return 0; }