projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a7850
)
compat/win32/pthread.h: Add an pthread_key_delete() implementation
author
Ramsay Jones
<ramsay@ramsay1.demon.co.uk>
Wed, 11 Apr 2012 05:49:46 +0000
(12:49 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 11 Apr 2012 18:08:43 +0000
(11:08 -0700)
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>
compat/win32/pthread.h
patch
|
blob
|
history
diff --git
a/compat/win32/pthread.h
b/compat/win32/pthread.h
index 2e205485570bf62a11112c665624203207c724a9..8ad187344fd93e894a2f1cbfaa0fb59fd832de5b 100644
(file)
--- 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;