summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-06-20 18:21:42 +0200
committerPatrick Steinhardt <ps@pks.im>2016-06-20 19:50:18 +0200
commit8aaa9fb6238336b313766d7bd9c20cff07cb840b (patch)
treef6c0f9cb5bbb3316bfbe63aa85000d6e885c765f
parenta342e870fcce7f524b54e5671cab4b0702e7540f (diff)
downloadlibgit2-8aaa9fb6238336b313766d7bd9c20cff07cb840b.tar.gz
win32: rename pthread.{c,h} to thread.{c,h}
The old pthread-file did re-implement the pthreads API with exact symbol matching. As the thread-abstraction has now been split up between Unix- and Windows-specific files within the `git_` namespace to avoid symbol-clashes between libgit2 and pthreads, the rewritten wrappers have nothing to do with pthreads anymore. Rename the Windows-specific pthread-files to honor this change.
-rw-r--r--src/common.h2
-rw-r--r--src/thread-utils.h2
-rw-r--r--src/win32/precompiled.h2
-rw-r--r--src/win32/thread.c (renamed from src/win32/pthread.c)2
-rw-r--r--src/win32/thread.h (renamed from src/win32/pthread.h)6
5 files changed, 7 insertions, 7 deletions
diff --git a/src/common.h b/src/common.h
index 9abd605cb..51fb9186e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -45,7 +45,7 @@
# include "win32/error.h"
# include "win32/version.h"
# ifdef GIT_THREADS
-# include "win32/pthread.h"
+# include "win32/thread.h"
# endif
# if defined(GIT_MSVC_CRTDBG)
# include "win32/w32_stack.h"
diff --git a/src/thread-utils.h b/src/thread-utils.h
index f75e44087..f0161989f 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -41,7 +41,7 @@ typedef git_atomic git_atomic_ssize;
#ifdef GIT_THREADS
#ifdef GIT_WIN32
-# include "win32/pthread.h"
+# include "win32/thread.h"
#else
# include "unix/pthread.h"
#endif
diff --git a/src/win32/precompiled.h b/src/win32/precompiled.h
index 33ce106d3..10ca0b80c 100644
--- a/src/win32/precompiled.h
+++ b/src/win32/precompiled.h
@@ -16,7 +16,7 @@
#include <io.h>
#include <direct.h>
#ifdef GIT_THREADS
- #include "win32/pthread.h"
+ #include "win32/thread.h"
#endif
#include "git2.h"
diff --git a/src/win32/pthread.c b/src/win32/thread.c
index 80329b2b0..8222c65fe 100644
--- a/src/win32/pthread.c
+++ b/src/win32/thread.c
@@ -5,7 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#include "pthread.h"
+#include "thread.h"
#include "../global.h"
#define CLEAN_THREAD_EXIT 0x6F012842
diff --git a/src/win32/pthread.h b/src/win32/thread.h
index 977d2dfab..f5dd41ba3 100644
--- a/src/win32/pthread.h
+++ b/src/win32/thread.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef GIT_PTHREAD_H
-#define GIT_PTHREAD_H
+#ifndef INCLUDE_win32_thread_h__
+#define INCLUDE_win32_thread_h__
#include "../common.h"
@@ -59,4 +59,4 @@ int git_rwlock_free(git_rwlock *);
extern int win32_pthread_initialize(void);
-#endif
+#endif /* INCLUDE_win32_thread_h__ */