diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-26 22:03:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-26 22:03:18 +0000 |
commit | 77c330ce3d71a76495cee444da11ee1d99733117 (patch) | |
tree | c542ac7a2b70e3aa819220862c4906726d549d8f /cpukit/posix/src/keydelete.c | |
parent | 2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-77c330ce3d71a76495cee444da11ee1d99733117.tar.bz2 |
2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/privateenv.c, libmisc/cpuuse/cpuusagereport.c,
posix/Makefile.am, posix/include/rtems/posix/key.h,
posix/src/keycreate.c, posix/src/keydelete.c,
score/src/iterateoverthreads.c: Since removing ITRON, the loop over
all APIs for tasks has a path that cannot be reached. Either modify
the code or mark tests for NULL as RTEMS_DEBUG.
* posix/src/keyfreememory.c: New file.
Diffstat (limited to 'cpukit/posix/src/keydelete.c')
-rw-r--r-- | cpukit/posix/src/keydelete.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index d4c58dd4cc..99b6e7eedd 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -23,18 +23,15 @@ #include <rtems/score/wkspace.h> #include <rtems/posix/key.h> -/*PAGE - * +/* * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ - int pthread_key_delete( pthread_key_t key ) { - register POSIX_Keys_Control *the_key; - Objects_Locations location; - uint32_t the_api; + POSIX_Keys_Control *the_key; + Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { @@ -42,15 +39,12 @@ int pthread_key_delete( case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); - for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) - if ( the_key->Values[ the_api ] ) - _Workspace_Free( the_key->Values[ the_api ] ); + _POSIX_Keys_Free_memory( the_key ); /* * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ - _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; |