summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-14 18:50:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-14 18:50:40 (GMT)
commitcc13431a49800a6a1d2b7ff0b94f67da0fecdbab (patch)
treedb2f27147a21f3b3b053b0af81937bec033219d4 /compat
parent3f8acaae8a6a025339c413c663fc8f0d73f29665 (diff)
parentb038a61020573b1be6e5fc5b2be4485b63a9cbf1 (diff)
downloadgit-cc13431a49800a6a1d2b7ff0b94f67da0fecdbab.zip
git-cc13431a49800a6a1d2b7ff0b94f67da0fecdbab.tar.gz
git-cc13431a49800a6a1d2b7ff0b94f67da0fecdbab.tar.bz2
Merge branch 'nd/threaded-index-pack'
Enables threading in index-pack to resolve base data in parallel. By Nguyễn Thái Ngọc Duy (3) and Ramsay Jones (1) * nd/threaded-index-pack: index-pack: disable threading if NO_PREAD is defined index-pack: support multithreaded delta resolving index-pack: restructure pack processing into three main functions compat/win32/pthread.h: Add an pthread_key_delete() implementation
Diffstat (limited to 'compat')
-rw-r--r--compat/win32/pthread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index 2e20548..8ad1873 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -86,6 +86,11 @@ static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(voi
return (*keyp = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0;
}
+static inline int pthread_key_delete(pthread_key_t key)
+{
+ return TlsFree(key) ? 0 : EINVAL;
+}
+
static inline int pthread_setspecific(pthread_key_t key, const void *value)
{
return TlsSetValue(key, (void *)value) ? 0 : EINVAL;