diff options
| author | rpj <rpj> | 1998-10-14 23:39:06 +0000 | 
|---|---|---|
| committer | rpj <rpj> | 1998-10-14 23:39:06 +0000 | 
| commit | c15534028aca0177a8e4b9257d11d43ff53135df (patch) | |
| tree | 014371918c97fe1a5bb4170d87d0742ec76e129a | |
| parent | 26a9df4873cf30481c6c690e1c85e51098707dbe (diff) | |
Thu Oct 15 14:05:01 1998  Ross Johnson  <rpj@swan.canberra.edu.au>
	* tsd.c (pthread_setspecific): Fix type declaration and cast.
	(pthread_getspecific): Ditto.
	(pthread_getspecific): Change error return value to NULL if key
	is not in use.
Yet again.
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | tsd.c | 6 | 
2 files changed, 5 insertions, 3 deletions
| @@ -2,6 +2,8 @@ Thu Oct 15 14:05:01 1998  Ross Johnson  <rpj@swan.canberra.edu.au>  	* tsd.c (pthread_setspecific): Fix type declaration and cast.  	(pthread_getspecific): Ditto. +	(pthread_getspecific): Change error return value to NULL if key +	is not in use.  Thu Oct 15 11:53:21 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au> @@ -81,7 +81,7 @@ pthread_key_create(pthread_key_t *key, void (*destructor)(void *))  int  pthread_setspecific(pthread_key_t key, void *value)  { -  void * keys[]; +  void ** keys;    int inuse;    /* CRITICAL SECTION */ @@ -104,7 +104,7 @@ pthread_setspecific(pthread_key_t key, void *value)  void *  pthread_getspecific(pthread_key_t key)  { -  void * keys[]; +  void ** keys;    int inuse;    /* CRITICAL SECTION */ @@ -116,7 +116,7 @@ pthread_getspecific(pthread_key_t key)    /* END CRITICAL SECTION */    if (! inuse) -    return EINVAL; +    return (void *) NULL;    keys = (void **) TlsGetValue(_pthread_TSD_keys_TlsIndex);    return keys[key]; | 
