diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-08 22:53:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-08 22:53:54 +0000 |
commit | 3f6d64dbf74216be9964b97783bbdf22b95712cf (patch) | |
tree | 495c0e879a06939e646eb1b1061d080ccc869d62 | |
parent | cb603903a2db32ac498afc959c6117d2967ec706 (diff) |
2007-11-08 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1266/cpukit
* src/keygetspecific.c, src/keyrundestructors.c, src/keysetspecific.c:
Use API instead of class for key indexing. Thanks to Phil Torre
<ptorre@zetron.com> for back porting the patch.
-rw-r--r-- | cpukit/posix/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/posix/src/keygetspecific.c | 8 | ||||
-rw-r--r-- | cpukit/posix/src/keyrundestructors.c | 14 | ||||
-rw-r--r-- | cpukit/posix/src/keysetspecific.c | 8 |
4 files changed, 22 insertions, 15 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog index 1d0567ea81..8995d3b7be 100644 --- a/cpukit/posix/ChangeLog +++ b/cpukit/posix/ChangeLog @@ -1,3 +1,10 @@ +2007-11-08 Joel Sherrill <joel.sherrill@OARcorp.com> + + PR 1266/cpukit + * src/keygetspecific.c, src/keyrundestructors.c, src/keysetspecific.c: + Use API instead of class for key indexing. Thanks to Phil Torre + <ptorre@zetron.com> for back porting the patch. + 2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com> PR 1261/cpukit diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c index ef3fd736a7..d10e6c2661 100644 --- a/cpukit/posix/src/keygetspecific.c +++ b/cpukit/posix/src/keygetspecific.c @@ -1,5 +1,5 @@ /* - * $Id$ + * keygetspecific.c,v 1.3 2002/12/02 19:15:24 joel Exp */ #if HAVE_CONFIG_H @@ -27,7 +27,7 @@ void *pthread_getspecific( { register POSIX_Keys_Control *the_key; unsigned32 index; - unsigned32 class; + unsigned32 api; Objects_Locations location; void *key_data; @@ -38,8 +38,8 @@ void *pthread_getspecific( return NULL; case OBJECTS_LOCAL: index = _Objects_Get_index( _Thread_Executing->Object.id ); - class = _Objects_Get_class( _Thread_Executing->Object.id ); - key_data = (void *) the_key->Values[ class ][ index ]; + api = _Objects_Get_API( _Thread_Executing->Object.id ); + key_data = (void *) the_key->Values[ api ][ index ]; _Thread_Enable_dispatch(); return key_data; } diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c index f07e9fe548..4b2b35bf88 100644 --- a/cpukit/posix/src/keyrundestructors.c +++ b/cpukit/posix/src/keyrundestructors.c @@ -1,5 +1,5 @@ /* - * $Id$ + * keyrundestructors.c,v 1.2 2001/01/24 14:17:28 joel Exp */ #if HAVE_CONFIG_H @@ -31,15 +31,15 @@ void _POSIX_Keys_Run_destructors( ) { unsigned32 index; - unsigned32 pthread_index; - unsigned32 pthread_class; + unsigned32 thread_index; + unsigned32 thread_api; 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 ); + thread_index = _Objects_Get_index( thread->Object.id ); + thread_api = _Objects_Get_API( thread->Object.id ); iterations = 0; @@ -53,10 +53,10 @@ void _POSIX_Keys_Run_destructors( _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { - value = the_key->Values[ pthread_class ][ pthread_index ]; + value = the_key->Values[ thread_api ][ thread_index ]; if ( value ) { (*the_key->destructor)( value ); - if ( the_key->Values[ pthread_class ][ pthread_index ] ) + if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = FALSE; } } diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c index 0f51f08d6b..204aa0b77c 100644 --- a/cpukit/posix/src/keysetspecific.c +++ b/cpukit/posix/src/keysetspecific.c @@ -1,5 +1,5 @@ /* - * $Id$ + * keysetspecific.c,v 1.2 2001/01/24 14:17:28 joel Exp */ #if HAVE_CONFIG_H @@ -28,7 +28,7 @@ int pthread_setspecific( { register POSIX_Keys_Control *the_key; unsigned32 index; - unsigned32 class; + unsigned32 api; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); @@ -38,8 +38,8 @@ int pthread_setspecific( return EINVAL; case OBJECTS_LOCAL: index = _Objects_Get_index( _Thread_Executing->Object.id ); - class = _Objects_Get_class( _Thread_Executing->Object.id ); - the_key->Values[ class ][ index ] = (void *) value; + api = _Objects_Get_API( _Thread_Executing->Object.id ); + the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); return 0; } |