compat/win32/pthread.h: Add an pthread_key_delete() implementation
PATCH 1/1 compat/win32/pthread.h: Add an pthread_key_delete() implementation
Signed-off-by Ramsay Jones <[email protected]>
---
Hi Nguyen,
I thought I had sent this several days ago, but I (obviously) forgot.
HTH.
ATB,
Ramsay Jones
compat/win32/pthread.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
compat/win32/pthread.h +5 -0
@@ -86,6 +86,11 @@ static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(voireturn (*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 ;
Signature · 1 line
1.7.9