From 8536584f1efdd34256c037193c69e45ca35e336d Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 12 Sep 1998 12:24:21 +0000 Subject: * tsd.c: Add comment explaining rationale for not building POSIX TSD on top of Win32 TLS. --- tsd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tsd.c') diff --git a/tsd.c b/tsd.c index 02069a9..015af85 100644 --- a/tsd.c +++ b/tsd.c @@ -4,6 +4,23 @@ * Description: * POSIX thread functions which implement thread-specific data (TSD). */ + +/* + * Why we can't use Win32 TLS + * -------------------------- + * + * In a word: Destructors + * + * POSIX 1003.1 1996, Section 17 allows for optional destructor functions + * to be associated with each key value. The destructors are called from + * the creating thread, which means that the calling thread must have access + * to the TSD keys of all active threads. + * + * If we use Win32 TLS then this is not possible since Tls*Value() + * functions don't allow us to access other than our own [thread's] key. + * + * As a result, these routines need to be redesigned. + */ #include -- cgit v1.2.3