Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/minhook.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZLOFENIX <admin@zlofenix.org>2015-05-19 22:42:30 +0300
committerZLOFENIX <admin@zlofenix.org>2015-05-19 22:42:30 +0300
commited8b581694c10cf3243a5d1160da4728511a11e3 (patch)
treec69f9601b70509f5ae7d0a987857556d203fb425
parent7d3b034f6014826efb09cb8be52c8286da280688 (diff)
Ok, removed usleep.
-rw-r--r--src/hook.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/hook.c b/src/hook.c
index 6a3807a..a7fd374 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -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);