summaryrefslogtreecommitdiff
path: root/src/win32/pthread.h
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@microsoft.com>2014-06-07 12:51:48 -0400
committerPhilip Kelley <phkelley@microsoft.com>2014-06-07 12:51:48 -0400
commitfb5917679dd1cc0ee50d1d88893c07cbcd82471f (patch)
tree595d891671995f6eec41458ecea62e90eb3f7cac /src/win32/pthread.h
parentdf192198d3ac2a2bd3d7960477e48602f648ec08 (diff)
downloadlibgit2-fb5917679dd1cc0ee50d1d88893c07cbcd82471f.tar.gz
Win32: Fix object::cache::threadmania test on x64
Diffstat (limited to 'src/win32/pthread.h')
-rw-r--r--src/win32/pthread.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/win32/pthread.h b/src/win32/pthread.h
index af5b121f0..a15504ed5 100644
--- a/src/win32/pthread.h
+++ b/src/win32/pthread.h
@@ -16,13 +16,18 @@
# define GIT_RESTRICT __restrict__
#endif
+typedef struct {
+ HANDLE thread;
+ void *(*proc)(void *);
+ void *value;
+} git_win32_thread;
+
typedef int pthread_mutexattr_t;
typedef int pthread_condattr_t;
typedef int pthread_attr_t;
typedef int pthread_rwlockattr_t;
typedef CRITICAL_SECTION pthread_mutex_t;
-typedef HANDLE pthread_t;
typedef HANDLE pthread_cond_t;
typedef struct { void *Ptr; } GIT_SRWLOCK;
@@ -36,13 +41,15 @@ typedef struct {
#define PTHREAD_MUTEX_INITIALIZER {(void*)-1}
-int pthread_create(
- pthread_t *GIT_RESTRICT thread,
- const pthread_attr_t *GIT_RESTRICT attr,
- void *(*start_routine)(void*),
- void *GIT_RESTRICT arg);
+int git_win32__thread_create(
+ git_win32_thread *GIT_RESTRICT,
+ const pthread_attr_t *GIT_RESTRICT,
+ void *(*) (void *),
+ void *GIT_RESTRICT);
-int pthread_join(pthread_t, void **);
+int git_win32__thread_join(
+ git_win32_thread *,
+ void **);
int pthread_mutex_init(
pthread_mutex_t *GIT_RESTRICT mutex,