]> git.proxmox.com Git - libgit2.git/blame - src/win32/pthread.h
Merge remote-tracking branch 'nulltoken/topic/oid-generation' into development
[libgit2.git] / src / win32 / pthread.h
CommitLineData
bbcc7ffc 1/*
bb742ede 2 * Copyright (C) 2009-2011 the libgit2 contributors
bbcc7ffc 3 *
bb742ede
VM
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.
bbcc7ffc
VM
6 */
7
8#ifndef GIT_PTHREAD_H
9#define GIT_PTHREAD_H
10
11#include "../common.h"
12
13#if defined (_MSC_VER)
14# define GIT_RESTRICT __restrict
15#else
16# define GIT_RESTRICT __restrict__
17#endif
18
19typedef int pthread_mutexattr_t;
20typedef int pthread_condattr_t;
21typedef int pthread_attr_t;
22typedef CRITICAL_SECTION pthread_mutex_t;
bbcc7ffc
VM
23typedef HANDLE pthread_t;
24
25#define PTHREAD_MUTEX_INITIALIZER {(void*)-1};
26
27int pthread_create(pthread_t *GIT_RESTRICT,
87d9869f
VM
28 const pthread_attr_t *GIT_RESTRICT,
29 void *(*start_routine)(void*), void *__restrict);
bbcc7ffc
VM
30
31int pthread_join(pthread_t, void **);
32
33int pthread_mutex_init(pthread_mutex_t *GIT_RESTRICT, const pthread_mutexattr_t *GIT_RESTRICT);
34int pthread_mutex_destroy(pthread_mutex_t *);
35int pthread_mutex_lock(pthread_mutex_t *);
36int pthread_mutex_unlock(pthread_mutex_t *);
37
bbcc7ffc
VM
38int pthread_num_processors_np(void);
39
bb3de0c4 40#endif