2 * Copyright (C) 2009-2011 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
11 #include "../common.h"
13 #if defined (_MSC_VER)
14 # define GIT_RESTRICT __restrict
16 # define GIT_RESTRICT __restrict__
19 typedef int pthread_mutexattr_t
;
20 typedef int pthread_condattr_t
;
21 typedef int pthread_attr_t
;
22 typedef CRITICAL_SECTION pthread_mutex_t
;
23 typedef HANDLE pthread_t
;
25 #define PTHREAD_MUTEX_INITIALIZER {(void*)-1};
27 int pthread_create(pthread_t
*GIT_RESTRICT
,
28 const pthread_attr_t
*GIT_RESTRICT
,
29 void *(*start_routine
)(void*), void *__restrict
);
31 int pthread_join(pthread_t
, void **);
33 int pthread_mutex_init(pthread_mutex_t
*GIT_RESTRICT
, const pthread_mutexattr_t
*GIT_RESTRICT
);
34 int pthread_mutex_destroy(pthread_mutex_t
*);
35 int pthread_mutex_lock(pthread_mutex_t
*);
36 int pthread_mutex_unlock(pthread_mutex_t
*);
38 int pthread_num_processors_np(void);