mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/keygetspecific.c, posix/src/keysetspecific.c: Correct indexing of key data to use api and index NOT class and index. Class is always 1.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2006-11-17 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* posix/src/keygetspecific.c, posix/src/keysetspecific.c: Correct
|
||||
indexing of key data to use api and index NOT class and index.
|
||||
Class is always 1.
|
||||
|
||||
2006-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Remove RTEMS_AMPOLISH3.
|
||||
|
||||
@@ -26,8 +26,8 @@ void *pthread_getspecific(
|
||||
)
|
||||
{
|
||||
register POSIX_Keys_Control *the_key;
|
||||
uint32_t api;
|
||||
uint32_t index;
|
||||
uint32_t class;
|
||||
Objects_Locations location;
|
||||
void *key_data;
|
||||
|
||||
@@ -37,9 +37,9 @@ void *pthread_getspecific(
|
||||
case OBJECTS_REMOTE: /* should never happen */
|
||||
return NULL;
|
||||
case OBJECTS_LOCAL:
|
||||
api = _Objects_Get_API( _Thread_Executing->Object.id );
|
||||
index = _Objects_Get_index( _Thread_Executing->Object.id );
|
||||
class = _Objects_Get_class( _Thread_Executing->Object.id );
|
||||
key_data = (void *) the_key->Values[ class ][ index ];
|
||||
key_data = (void *) the_key->Values[ api ][ index ];
|
||||
_Thread_Enable_dispatch();
|
||||
return key_data;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ int pthread_setspecific(
|
||||
)
|
||||
{
|
||||
register POSIX_Keys_Control *the_key;
|
||||
uint32_t api;
|
||||
uint32_t index;
|
||||
uint32_t class;
|
||||
Objects_Locations location;
|
||||
|
||||
the_key = _POSIX_Keys_Get( key, &location );
|
||||
@@ -37,9 +37,9 @@ int pthread_setspecific(
|
||||
case OBJECTS_REMOTE: /* should never happen */
|
||||
return EINVAL;
|
||||
case OBJECTS_LOCAL:
|
||||
api = _Objects_Get_API( _Thread_Executing->Object.id );
|
||||
index = _Objects_Get_index( _Thread_Executing->Object.id );
|
||||
class = _Objects_Get_class( _Thread_Executing->Object.id );
|
||||
the_key->Values[ class ][ index ] = (void *) value;
|
||||
the_key->Values[ api ][ index ] = (void *) value;
|
||||
_Thread_Enable_dispatch();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user