summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-04-11 12:49:46 +0700
committerJunio C Hamano <gitster@pobox.com>2012-04-11 11:08:43 -0700
commit9ba604a9e474142c0fa1cd03830e2281cde5e66d (patch)
tree00b62ee3c02def37cc6a4f8d6e23e2105fab5282 /compat
parent25a7850a106ed0f27b88b8ce0b89fd326120dff4 (diff)
downloadgit-9ba604a9e474142c0fa1cd03830e2281cde5e66d.tar.gz
compat/win32/pthread.h: Add an pthread_key_delete() implementation
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 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;