From 9513a4df26d02f1326f31bccedf9e4dc5cfe3801 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 6 Aug 1998 06:40:50 +0000 Subject: Thu Aug 6 15:19:22 1998 Ross Johnson * 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. --- ChangeLog | 7 +++++++ cleanup.c | 7 ++++--- implement.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 742a262..d2573b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ Thu Aug 6 15:19:22 1998 Ross Johnson + * 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. diff --git a/cleanup.c b/cleanup.c index 9c71a27..472b7c6 100644 --- a/cleanup.c +++ b/cleanup.c @@ -6,6 +6,7 @@ * threads. */ +#include #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. */ -- cgit v1.2.3