git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] compat/win32/pthread.h: Add an pthread_key_delete() implementation

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Mar 17, 2012, 18:24 UTC
Message-ID
<4F64D6D3.5090802@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
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(-)
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index 2e20548..8ad1873 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;
-- 
1.7.9
Message 1 of 1 in “compat/win32/pthread.h: Add an pthread_key_delete() implementation”
  1. compat/win32/pthread.h: Add an pthread_key_delete() implementationRamsay Jones, Mar 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.