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. --- cleanup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cleanup.c') 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; -- cgit v1.2.3