42 #include <sys/types.h>
43 #include <sys/syscall.h>
46 #if defined(G4MULTITHREADED)
57 return syscall(SYS_thread_selfid);
59 return GetCurrentThreadId();
61 return syscall(SYS_gettid);
69 GetSystemInfo( &sysinfo );
70 return static_cast<G4int>( sysinfo.dwNumberOfProcessors );
72 return static_cast<G4int>(sysconf( _SC_NPROCESSORS_ONLN ));
80 #if defined(WIN32) // WIN32 stuff needed for MT
81 DWORD G4WaitForSingleObjectInf( __in
G4Mutex m )
82 {
return WaitForSingleObject( m , INFINITE); }
84 {
return ReleaseMutex(m); }
87 #else // Sequential mode
96 return GetCurrentProcessId();
void G4SetThreadId(G4int aNewValue)
G4int G4GetNumberOfCores()
G4int fake_mutex_lock_unlock(G4Mutex *)