diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-07-22 09:46:48 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-07-22 09:46:48 +0000 |
commit | 2b3e9d9b244e279ef5693a7cf5dacc7903164af5 (patch) | |
tree | 955e5242d4d08a8ec747c8350f55003bb9d4b519 /c/src/exec/posix/src/keyrundestructors.c | |
parent | Remove everything. (diff) | |
download | rtems-2b3e9d9b244e279ef5693a7cf5dacc7903164af5.tar.bz2 |
Remove, moved to cpukit.
Diffstat (limited to 'c/src/exec/posix/src/keyrundestructors.c')
-rw-r--r-- | c/src/exec/posix/src/keyrundestructors.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/c/src/exec/posix/src/keyrundestructors.c b/c/src/exec/posix/src/keyrundestructors.c deleted file mode 100644 index f07e9fe548..0000000000 --- a/c/src/exec/posix/src/keyrundestructors.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * $Id$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <errno.h> -#include <limits.h> -#include <pthread.h> -#include <string.h> - -#include <rtems/system.h> -#include <rtems/score/thread.h> -#include <rtems/score/wkspace.h> -#include <rtems/posix/key.h> - -/*PAGE - * - * _POSIX_Keys_Run_destructors - * - * 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 - * - * NOTE: This is the routine executed when a thread exits to - * run through all the keys and do the destructor action. - */ - -void _POSIX_Keys_Run_destructors( - Thread_Control *thread -) -{ - unsigned32 index; - unsigned32 pthread_index; - unsigned32 pthread_class; - unsigned32 iterations; - boolean are_all_null; - POSIX_Keys_Control *the_key; - void *value; - - pthread_index = _Objects_Get_index( thread->Object.id ); - pthread_class = _Objects_Get_class( thread->Object.id ); - - iterations = 0; - - for ( ; ; ) { - - are_all_null = TRUE; - - for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { - - the_key = (POSIX_Keys_Control *) - _POSIX_Keys_Information.local_table[ index ]; - - if ( the_key && the_key->is_active && the_key->destructor ) { - value = the_key->Values[ pthread_class ][ pthread_index ]; - if ( value ) { - (*the_key->destructor)( value ); - if ( the_key->Values[ pthread_class ][ pthread_index ] ) - are_all_null = FALSE; - } - } - } - - if ( are_all_null == TRUE ) - return; - - iterations++; - - /* - * The standard allows one to not do this and thus go into an infinite - * loop. It seems rude to unnecessarily lock up a system. - * - * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. - */ - - if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) - return; - } -} |