summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
37c91aa)
When it is already defined(_WIN32).
According to Microsoft documentation:
http://msdn.microsoft.com/en-us/library/b0084kay.aspx
_WIN32 Defined for applications for Win32 and Win64. Always defined.
_WIN64 Defined for applications for Win64.
Patch suggested by Joona.
No functional change.
-#if defined(_WIN32) || defined(_WIN64)
SYSTEM_INFO s;
GetSystemInfo(&s);
return s.dwNumberOfProcessors;
SYSTEM_INFO s;
GetSystemInfo(&s);
return s.dwNumberOfProcessors;
void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
-#if defined(_WIN32) || defined(_WIN64)
int tm = msec;
#else
timespec ts, *tm = &ts;
int tm = msec;
#else
timespec ts, *tm = &ts;
# include <unistd.h> // Used by sysconf(_SC_NPROCESSORS_ONLN)
#endif
# include <unistd.h> // Used by sysconf(_SC_NPROCESSORS_ONLN)
#endif
-#if !defined(_WIN32) && !defined(_WIN64) // Linux - Unix
+#if !defined(_WIN32) // Linux - Unix
# include <sys/time.h>
typedef timeval sys_time_t;
# include <sys/time.h>
typedef timeval sys_time_t;