diff options
author | Zhongwei Yao <ashi08104@gmail.com> | 2013-08-05 09:20:45 -0400 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-06 14:11:38 +0200 |
commit | b5c906429f6e67452eec1b0089ac7a204ff998ee (patch) | |
tree | 5e24aed5499922f6d3fa6e1559f5bc7e83fba4b2 /cpukit/posix/src/keydelete.c | |
parent | bsp/realview-pbx-a9: Enable fast idle clock (diff) | |
download | rtems-b5c906429f6e67452eec1b0089ac7a204ff998ee.tar.bz2 |
Unlimited objects support for POSIX keys
This patch enables unlimited model in POSIX key manger and have a decent
runtime on POSIX key searching, adding and deleting operations. Memory
overhead is lower than current implementation when the size of key and key
value becomes big.
Diffstat (limited to 'cpukit/posix/src/keydelete.c')
-rw-r--r-- | cpukit/posix/src/keydelete.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index 8f96ca36fe..c3d3da1a3b 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -6,12 +6,12 @@ */ /* - * COPYRIGHT (c) 1989-2007. - * On-Line Applications Research Corporation (OAR). + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. */ #if HAVE_CONFIG_H @@ -42,8 +42,6 @@ int pthread_key_delete( switch ( location ) { case OBJECTS_LOCAL: - _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); - _POSIX_Keys_Free_memory( the_key ); /* @@ -51,7 +49,7 @@ int pthread_key_delete( * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); - _Objects_Put( &the_key->Object ); + _Objects_Put(&the_key->Object); return 0; #if defined(RTEMS_MULTIPROCESSING) |