summaryrefslogtreecommitdiff
path: root/test/windows
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-03-20 01:07:59 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-03-25 13:50:13 -0400
commit17bd2356a5b17893e626749be399fb8fda23db1e (patch)
treed7f7ef0425ba516fc617ba6715fb6a06ea2f2a93 /test/windows
parenta09b0ab2e97a839832e0174871f18353a3303ba3 (diff)
downloadmongo-17bd2356a5b17893e626749be399fb8fda23db1e.tar.gz
Use beginthreadex, and ensure we use the correct C calling conventions in all callbacks
Diffstat (limited to 'test/windows')
-rw-r--r--test/windows/windows_shim.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/windows/windows_shim.c b/test/windows/windows_shim.c
index 646ebf0c441..8b0f05bfe2d 100644
--- a/test/windows/windows_shim.c
+++ b/test/windows/windows_shim.c
@@ -59,6 +59,7 @@ usleep(useconds_t useconds)
int
pthread_rwlock_destroy(pthread_rwlock_t *lock)
{
+ lock = lock;
return (0);
}
@@ -66,6 +67,7 @@ int
pthread_rwlock_init(pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *ignored)
{
+ ignored = ignored;
InitializeSRWLock(&rwlock->rwlock);
rwlock->exclusive_locked = 0;
@@ -99,13 +101,15 @@ pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
rwlock->exclusive_locked = GetCurrentThreadId();
return (0);
-
}
+#pragma warning( once : 4024 )
+#pragma warning( once : 4047 )
int
pthread_create(pthread_t *tidret, const pthread_attr_t *ignored,
void *(*func)(void *), void * arg)
{
+ ignored = ignored;
*tidret = CreateThread(NULL, 0, func, arg, 0, NULL);
if (*tidret != NULL)
@@ -117,6 +121,7 @@ pthread_create(pthread_t *tidret, const pthread_attr_t *ignored,
int
pthread_join(pthread_t thread, void **ignored)
{
+ ignored = ignored;
WaitForSingleObject(thread, INFINITE);
return (0);
}