diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-17 07:56:31 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-18 07:43:46 +0100 |
commit | 5eaf0e7458bac80ba669f03c4feaae5bad55c6c9 (patch) | |
tree | a6ed26d6617c2b1c2503df1607443e966d875897 /cpukit/posix/src/keycreate.c | |
parent | score: Destroy thread timer lock (diff) | |
download | rtems-5eaf0e7458bac80ba669f03c4feaae5bad55c6c9.tar.bz2 |
posix: Use per-thread lookup tree for POSIX Keys
Yields higher performance on SMP systems.
Close #2625.
Diffstat (limited to 'cpukit/posix/src/keycreate.c')
-rw-r--r-- | cpukit/posix/src/keycreate.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c index 245ac9e3f3..432bfd86b6 100644 --- a/cpukit/posix/src/keycreate.c +++ b/cpukit/posix/src/keycreate.c @@ -8,6 +8,7 @@ /* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). + * Copyright (c) 2016 embedded brains GmbH. * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -18,16 +19,10 @@ #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/keyimpl.h> +#include <errno.h> + /** * 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ @@ -46,6 +41,7 @@ int pthread_key_create( } the_key->destructor = destructor; + _Chain_Initialize_empty( &the_key->Key_value_pairs ); _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Objects_Allocator_unlock(); |