Configuration define statement for using pthread_key_create().

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 15 12:39:22 UTC 2014


On 2014-04-15 14:37, Joel Sherrill wrote:
>
> On Apr 15, 2014 6:11 AM, Sebastian Huber <sebastian.huber at embedded-brains.de>
> wrote:
>  >
>  > On 2014-04-15 13:08, Sebastian Huber wrote:
>  > >> Case 2.
>  > >> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
>  > >> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>  > >> #define CONFIGURE_UNLIMITED_OBJECTS
>  > >
>  > > In case of unlimited objects you should also use:
>  > >
>  > > #define CONFIGURE_UNIFIED_WORK_AREAS
>  > >
>  > >> #define CONFIGURE_POSIX_INIT_THREAD_TABLE
>  > >> #define CONFIGURE_INIT
>  > >> #include <rtems/confdefs.h>
>  >
>  > I just realized that the unlimited objects support is broken for POSIX keys.
>  > So you should use Case 1.
>
> Which part do you think is broken? The move to rbtree implementation removed
> the issue with more threads being added. You can still run out of key/value
> pairs but keys work with unlimited threads.
>

In confdefs.h we have:

[...]
   #ifdef RTEMS_POSIX_API
     #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS)
       #define CONFIGURE_MAXIMUM_POSIX_THREADS \
         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     #endif
     #if !defined(CONFIGURE_MAXIMUM_POSIX_MUTEXES)
       #define CONFIGURE_MAXIMUM_POSIX_MUTEXES \
         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     #endif
     #if !defined(CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES)
       #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES \
         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     #endif
/*
     #if !defined(CONFIGURE_MAXIMUM_POSIX_KEYS)
       #define CONFIGURE_MAXIMUM_POSIX_KEYS \
         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     #endif
*/
     #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS)
       #define CONFIGURE_MAXIMUM_POSIX_TIMERS \
         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     #endif
[...]

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list