{"thread":{"id":"29982","subject":"[PATCH] compat/win32/pthread.h: Add an pthread_key_delete() implementation","startedAt":"2012-03-17T18:24:19Z","lastAt":"2012-03-17T18:24:19Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"187168","messageId":"4F64D6D3.5090802@ramsay1.demon.co.uk","threadId":"29982","inReplyTo":null,"subject":"[PATCH] compat/win32/pthread.h: Add an pthread_key_delete() implementation","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-03-17T18:24:19Z","receivedAt":"2012-03-17T18:24:19Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Nguyen,\n\nI thought I had sent this several days ago, but I (obviously) forgot.\n\nHTH.\n\nATB,\nRamsay Jones\n\n compat/win32/pthread.h |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/win32/pthread.h b/compat/win32/pthread.h\nindex 2e20548..8ad1873 100644\n--- a/compat/win32/pthread.h\n+++ b/compat/win32/pthread.h\n@@ -86,6 +86,11 @@ static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(voi\n \treturn (*keyp = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0;\n }\n \n+static inline int pthread_key_delete(pthread_key_t key)\n+{\n+\treturn TlsFree(key) ? 0 : EINVAL;\n+}\n+\n static inline int pthread_setspecific(pthread_key_t key, const void *value)\n {\n \treturn TlsSetValue(key, (void *)value) ? 0 : EINVAL;\n-- \n1.7.9\n"}]}