diff options
| author | Patrick Steinhardt <ps@pks.im> | 2016-06-20 17:44:04 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2016-06-20 19:32:59 +0200 |
| commit | faebc1c6eccacd9659d21f848a9e2be55de671c7 (patch) | |
| tree | 2354b2895cc7be0110e0093813253408e8f6af35 /src/thread-utils.h | |
| parent | 69c71f2917fede843789e783ab6fe0fcda68753a (diff) | |
| download | libgit2-faebc1c6eccacd9659d21f848a9e2be55de671c7.tar.gz | |
threads: split up OS-dependent thread code
Diffstat (limited to 'src/thread-utils.h')
| -rw-r--r-- | src/thread-utils.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index 14c8a41ff..11c026f33 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -41,16 +41,7 @@ typedef git_atomic git_atomic_ssize; #ifdef GIT_THREADS #if !defined(GIT_WIN32) - -typedef struct { - pthread_t thread; -} git_thread; - -#define git_thread_create(git_thread_ptr, attr, start_routine, arg) \ - pthread_create(&(git_thread_ptr)->thread, attr, start_routine, arg) -#define git_thread_join(git_thread_ptr, status) \ - pthread_join((git_thread_ptr)->thread, status) - +# include "unix/pthread.h" #endif /* Pthreads Mutex */ @@ -178,7 +169,7 @@ GIT_INLINE(int64_t) git_atomic64_add(git_atomic64 *a, int64_t addend) #else #define git_thread unsigned int -#define git_thread_create(thread, attr, start_routine, arg) 0 +#define git_thread_create(thread, start_routine, arg) 0 #define git_thread_join(id, status) (void)0 /* Pthreads Mutex */ |
