summaryrefslogtreecommitdiff
path: root/compat/win32
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-14 11:50:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-14 11:50:40 -0700
commitcc13431a49800a6a1d2b7ff0b94f67da0fecdbab (patch)
treedb2f27147a21f3b3b053b0af81937bec033219d4 /compat/win32
parentSync with maint (diff)
parentindex-pack: disable threading if NO_PREAD is defined (diff)
downloadtgif-cc13431a49800a6a1d2b7ff0b94f67da0fecdbab.tar.xz
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/win32')
-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 2e20548557..8ad187344f 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;