diff --git a/magick/semaphore.c b/magick/semaphore.c
index 5a5cb93..f206f86 100644
--- a/magick/semaphore.c
+++ b/magick/semaphore.c
@@ -168,13 +168,18 @@
}
}
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
- status=InitializeCriticalSection(&semaphore_info->mutex,0x0400);
- if (status == 0)
- {
- errno=status;
- ThrowFatalException(ResourceLimitFatalError,
- "UnableToInitializeSemaphore");
- }
+ {
+ int
+ status;
+
+ status=InitializeCriticalSectionAndSpinCount(&semaphore_info->mutex,0x0400);
+ if (status == 0)
+ {
+ errno=status;
+ ThrowFatalException(ResourceLimitFatalError,
+ "UnableToInitializeSemaphore");
+ }
+ }
#endif
semaphore_info->id=GetMagickThreadId();
semaphore_info->reference_count=0;