Size virtualScreen;
Point virtualScreenPos;
- int mainThread;
+ int64 mainThread;
GuiApplication()
{
// Reentrant FileNotification is asking for trouble since each monitor is spawning a Modal() MessageBox
if(reentrant) return false;
- // printf("[%d] Waiting in ProcessFileNotifications for fileMonitor Mutex %x...\n", GetCurrentThreadID(), globalSystem.fileMonitorMutex);
+ // printf("[%d] Waiting in ProcessFileNotifications for fileMonitor Mutex %x...\n", (int)GetCurrentThreadID(), globalSystem.fileMonitorMutex);
globalSystem.fileMonitorMutex.Wait();
reentrant++;
for(monitor = globalSystem.fileMonitors.first; monitor; monitor = next)
monitor.FreeMonitor();
}
}
- // printf("[%d] Releasing in ProcessFileNotifications fileMonitor Mutex %x...\n", GetCurrentThreadID(), globalSystem.fileMonitorMutex);
+ // printf("[%d] Releasing in ProcessFileNotifications fileMonitor Mutex %x...\n", (int)GetCurrentThreadID(), globalSystem.fileMonitorMutex);
globalSystem.fileMonitorMutex.Release();
return activity;
}
if(serverSocket && serverSocket.connected)
{
- int currentThreadID = GetCurrentThreadID();
+ int64 currentThreadID = GetCurrentThreadID();
int callID = nextCallID++;
DCOMServerSocket socket = serverSocket;
DCOMServerSocket processingSocket;
bool leftOverBytes;
Mutex processMutex;
Mutex mutex;
- int mainThreadID;
+ int64 mainThreadID;
OldList mtSemaphores;
};
bool fileActivity = false;
lastTime = currentTime;
- // printf("[%d] Waiting in MonitorThread for fileMonitor Mutex %x...\n", GetCurrentThreadID(), globalSystem.fileMonitorMutex);
+ // printf("[%d] Waiting in MonitorThread for fileMonitor Mutex %x...\n", (int)GetCurrentThreadID(), globalSystem.fileMonitorMutex);
globalSystem.fileMonitorMutex.Wait();
for(monitor = globalSystem.fileMonitors.first; monitor; monitor = monitor.next)
}
if(fileActivity)
{
- // printf("[%d] Signaling Event...\n", GetCurrentThreadID());
+ // printf("[%d] Signaling Event...\n", (int)GetCurrentThreadID());
guiApp.SignalEvent();
}
- // printf("[%d] Releasing Mutex...\n", GetCurrentThreadID());
+ // printf("[%d] Releasing Mutex...\n", (int)GetCurrentThreadID());
globalSystem.fileMonitorMutex.Release();
}
- // printf("[%d] Sleeping...\n", GetCurrentThreadID());
+ // printf("[%d] Sleeping...\n", (int)GetCurrentThreadID());
Sleep(1.0 / 18.2);
}
return 0;
import "instance"
// Moved this here from Thread.ec to make compiling ecereCOM in Debug easier
-public int GetCurrentThreadID()
+public int64 GetCurrentThreadID()
{
#if defined(__WIN32__)
- return (int)GetCurrentThreadId();
+ return (int64)GetCurrentThreadId();
#else
- return (int)pthread_self();
+ return (int64)pthread_self();
#endif
}
#endif
#ifdef _DEBUG
- int owningThread;
+ int64 owningThread;
#endif
int lockCount;
{
/*
if(this == globalSystem.fileMonitorMutex)
- printf("[%d] Waiting on Mutex %x\n", GetCurrentThreadID(), this);
+ printf("[%d] Waiting on Mutex %x\n", (int)GetCurrentThreadID(), this);
*/
#if defined(__WIN32__)
#ifdef _DEBUG
{
/*
if(this == globalSystem.fileMonitorMutex)
- printf("[%d] Releasing Mutex %x\n", GetCurrentThreadID(), this);
+ printf("[%d] Releasing Mutex %x\n", (int)GetCurrentThreadID(), this);
*/
#ifdef _DEBUG
if(lockCount && owningThread != GetCurrentThreadID())