diff options
author | Philip Kelley <phkelley@microsoft.com> | 2014-06-07 13:56:39 -0400 |
---|---|---|
committer | Philip Kelley <phkelley@microsoft.com> | 2014-06-07 14:40:42 -0400 |
commit | 1b4e29b7f68ce80bb01fd878f6ddc6cf20819581 (patch) | |
tree | 84b41c3100b3ce52fbfee514891927a16f8594bb /src/thread-utils.h | |
parent | fb5917679dd1cc0ee50d1d88893c07cbcd82471f (diff) | |
download | libgit2-1b4e29b7f68ce80bb01fd878f6ddc6cf20819581.tar.gz |
React to review feedback
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r-- | src/thread-utils.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index 0cc7b04ad..daec14eeb 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -40,21 +40,16 @@ typedef git_atomic git_atomic_ssize; #ifdef GIT_THREADS -#if defined(GIT_WIN32) - -#define git_thread git_win32_thread -#define git_thread_create(thread, attr, start_routine, arg) \ - git_win32__thread_create(thread, attr, start_routine, arg) -#define git_thread_join(thread_ptr, status) \ - git_win32__thread_join(thread_ptr, status) +#if !defined(GIT_WIN32) -#else +typedef struct { + pthread_t thread; +} git_thread; -#define git_thread pthread_t -#define git_thread_create(thread, attr, start_routine, arg) \ - pthread_create(thread, attr, start_routine, arg) -#define git_thread_join(thread_ptr, status) \ - pthread_join(*(thread_ptr), status) +#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) #endif |