diff options
author | ZLOFENIX <admin@zlofenix.org> | 2015-05-19 22:42:30 +0300 |
---|---|---|
committer | ZLOFENIX <admin@zlofenix.org> | 2015-05-19 22:42:30 +0300 |
commit | ed8b581694c10cf3243a5d1160da4728511a11e3 (patch) | |
tree | c69f9601b70509f5ae7d0a987857556d203fb425 | |
parent | 7d3b034f6014826efb09cb8be52c8286da280688 (diff) |
Ok, removed usleep.
-rw-r--r-- | src/hook.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -38,7 +38,6 @@ #ifndef ARRAYSIZE #define ARRAYSIZE(x) sizeof(x)/sizeof(*x) #endif -#include <unistd.h> #else #include <intrin.h> #include <xmmintrin.h> @@ -457,17 +456,14 @@ static VOID EnterSpinLock(VOID) _ReadWriteBarrier(); #endif // Prevent the loop from being too busy. -#ifndef _MSC_VER if (spinCount < 16) - usleep(250); - else if (spinCount < 32) - usleep(500); +#ifndef _MSC_VER + Sleep(0); #else - if (spinCount < 16) _mm_pause(); +#endif else if (spinCount < 32) Sleep(0); -#endif else Sleep(1); |