From: Ken Raeburn Date: Wed, 7 Jul 2004 01:34:08 +0000 (+0000) Subject: Make thread-specific data support build under Windows (but don't enable it yet) X-Git-Tag: krb5-1.4-beta1~247 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aa2e82af675d2436e8f4347940d27a272ed1ba8f;p=krb5.git Make thread-specific data support build under Windows (but don't enable it yet) * threads.c (struct tsd_block) [_WIN32]: Define. (k5_setspecific) [_WIN32]: Don't fill in a 'next' field. Fix variable reference for TSD key. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16551 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index 534868d3a..36e8fefe8 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -1,3 +1,9 @@ +2004-07-06 Ken Raeburn + + * threads.c (struct tsd_block) [_WIN32]: Define. + (k5_setspecific) [_WIN32]: Don't fill in a 'next' field. Fix + variable reference for TSD key. + 2004-06-24 Ken Raeburn * threads.c: Reorganize code: One definition of each function, diff --git a/src/util/support/threads.c b/src/util/support/threads.c index d80091b39..b6741c023 100644 --- a/src/util/support/threads.c +++ b/src/util/support/threads.c @@ -47,6 +47,9 @@ static unsigned char destructors_set[K5_KEY_MAX]; static DWORD tls_idx; static CRITICAL_SECTION key_lock; +struct tsd_block { + void *values[K5_KEY_MAX]; +}; static void (*destructors[K5_KEY_MAX])(void *); static unsigned char destructors_set[K5_KEY_MAX]; @@ -204,8 +207,8 @@ int k5_setspecific (k5_key_t keynum, void *value) for (i = 0; i < K5_KEY_MAX; i++) t->values[i] = 0; /* add to global linked list */ - t->next = 0; - err = TlsSetValue(key, t); + /* t->next = 0; */ + err = TlsSetValue(tls_idx, t); if (err) { free(t); return err;