diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | cleanup.c | 7 | ||||
-rw-r--r-- | implement.h | 2 |
3 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,12 @@ Thu Aug 6 15:19:22 1998 Ross Johnson <rpj@swan.canberra.edu.au> + * cleanup.c (_pthread_destructor_pop_all): Add (int) cast to + pthread_getspecific() arg. + (_pthread_destructor_pop): Add (void *) cast to "if" conditional. + (_pthread_destructor_push): Add (void *) cast to + _pthread_handler_push() "key" arg. + (malloc.h): Add include. + * implement.h (_pthread_destructor_pop): Add prototype. * tsd.c (implement.h): Add include. @@ -6,6 +6,7 @@ * threads. */ +#include <malloc.h> #include "pthread.h" #include "implement.h" @@ -124,7 +125,7 @@ _pthread_destructor_push(void (* routine)(void *), pthread_key_t key) return _pthread_handler_push(_PTHREAD_DESTRUCTOR_STACK, _PTHREAD_HANDLER_POP_LIFO, routine, - key); + (void *) key); } @@ -144,7 +145,7 @@ _pthread_destructor_pop(pthread_key_t key) next = current->next; /* The destructors associated key is in current->arg. */ - if (current->arg == key) + if (current->arg == (void *) key) { if (current == *head) { @@ -192,7 +193,7 @@ _pthread_destructor_pop_all() func = current->routine; /* Get the key value using the key which is in current->arg. */ - arg = pthread_getspecific(current->arg); + arg = pthread_getspecific((int) current->arg); next = current->next; diff --git a/implement.h b/implement.h index 9e542c0..3e270c6 100644 --- a/implement.h +++ b/implement.h @@ -45,7 +45,7 @@ typedef struct { /* Macro to compute the address of a given handler stack. */ #define _PTHREAD_STACK(stack) \ - ((_pthread_handler_node_t *) &(pthread_self())->cleanupstack + stack); + ((_pthread_handler_node_t **) &(pthread_self()->cleanupstack) + stack); /* Macro to compute the table index of a thread entry from it's entry address. */ |