mirror of
https://git.proxmox.com/git/libgit2
synced 2026-08-26 20:08:02 +00:00
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>
This commit is contained in:
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user