diff options
author | rpj <rpj> | 1998-09-12 12:24:21 +0000 |
---|---|---|
committer | rpj <rpj> | 1998-09-12 12:24:21 +0000 |
commit | 8536584f1efdd34256c037193c69e45ca35e336d (patch) | |
tree | d4768ab8ddf5980bc1be2cdec6c2c094cddd584d | |
parent | 6ce00ffe10306ce8063dad1b64530fdde4867820 (diff) |
* tsd.c: Add comment explaining rationale for not building
POSIX TSD on top of Win32 TLS.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | tsd.c | 17 |
2 files changed, 20 insertions, 0 deletions
@@ -7,6 +7,9 @@ Sat Sep 12 20:09:24 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * windows.h: Remove error number definitions. These are in <errno.h> + + * tsd.c: Add comment explaining rationale for not building + POSIX TSD on top of Win32 TLS. 1998-09-12 Ben Elliston <bje@cygnus.com> @@ -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 <errno.h> |