summaryrefslogtreecommitdiff
path: root/include/git2/thread-utils.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-03-15 21:04:41 +0200
committerVicent Marti <tanoku@gmail.com>2011-03-15 21:14:07 +0200
commitbbcc7ffc690c4065954102530447aef4e8ccf895 (patch)
tree94566de36b18a1345a83a33fd8be9df0a35afe35 /include/git2/thread-utils.h
parentb5abb881a623b8b492e0375b8e9c8936079c39bb (diff)
downloadlibgit2-bbcc7ffc690c4065954102530447aef4e8ccf895.tar.gz
Add proper threading support to libgit2
We now depend on libpthread on all Unix platforms (should be installed by default) and use a simple wrapper for Windows threads under Win32. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'include/git2/thread-utils.h')
-rw-r--r--include/git2/thread-utils.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/git2/thread-utils.h b/include/git2/thread-utils.h
index c45a76e95..ecb09bb53 100644
--- a/include/git2/thread-utils.h
+++ b/include/git2/thread-utils.h
@@ -32,7 +32,6 @@
*/
#define GIT_HAS_TLS 1
-#define GIT_HAS_PTHREAD 1
#if defined(__APPLE__) && defined(__MACH__)
# undef GIT_TLS
@@ -47,7 +46,6 @@
#elif defined(__INTEL_COMPILER)
# if defined(_WIN32) || defined(_WIN32_CE)
# define GIT_TLS __declspec(thread)
-# undef GIT_HAS_PTHREAD
# else
# define GIT_TLS __thread
# endif
@@ -56,11 +54,9 @@
defined(_WIN32_CE) || \
defined(__BORLANDC__)
# define GIT_TLS __declspec(thread)
-# undef GIT_HAS_PTHREAD
#else
# undef GIT_HAS_TLS
-# undef GIT_HAS_PTHREAD
# define GIT_TLS /* nothing: tls vars are thread-global */
#endif
@@ -71,10 +67,6 @@
# define GIT_TLS
#endif
-#ifdef GIT_HAS_PTHREAD
-# define GIT_THREADS 1
-#else
-# undef GIT_THREADS
-#endif
+#define GIT_THREADS 1
#endif /* INCLUDE_git_thread_utils_h__ */