forked from Imagelibrary/rtems
posix: Use interal mutex for once implementation
Enable pthread_once() for all configurations. The pthread_once() function is one means to initialize POSIX keys. Another use case is the C++ support.
This commit is contained in:
@@ -1765,11 +1765,6 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
#include <rtems/posix/threadsup.h>
|
||||
#include <rtems/posix/timer.h>
|
||||
|
||||
/**
|
||||
* POSIX Once support uses a single mutex.
|
||||
*/
|
||||
#define CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES 1
|
||||
|
||||
/**
|
||||
* Account for the object control structures plus the name
|
||||
* of the object to be duplicated.
|
||||
@@ -1899,7 +1894,6 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX \
|
||||
( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES + \
|
||||
CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES + \
|
||||
CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
|
||||
CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
|
||||
@@ -2130,11 +2124,11 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
#endif
|
||||
|
||||
/**
|
||||
* RTEMS uses one instance of an internal mutex class. This accounts
|
||||
* for that mutex
|
||||
* RTEMS uses two instance of an internal mutex class. This accounts
|
||||
* for these mutexes.
|
||||
*/
|
||||
#define CONFIGURE_API_MUTEX_MEMORY \
|
||||
_Configure_Object_RAM(1, sizeof(API_Mutex_Control))
|
||||
_Configure_Object_RAM(2, sizeof(API_Mutex_Control))
|
||||
|
||||
/**
|
||||
* This calculates the amount of memory reserved for the IDLE tasks.
|
||||
@@ -2349,7 +2343,6 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS +
|
||||
CONFIGURE_MAXIMUM_GOROUTINES,
|
||||
CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
|
||||
CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES +
|
||||
CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS +
|
||||
CONFIGURE_GO_INIT_MUTEXES + CONFIGURE_MAXIMUM_GO_CHANNELS,
|
||||
CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
|
||||
@@ -2599,7 +2592,6 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
#ifdef RTEMS_POSIX_API
|
||||
/* POSIX API Pieces */
|
||||
CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES +
|
||||
CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES +
|
||||
CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES),
|
||||
CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
|
||||
CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
|
||||
|
||||
Reference in New Issue
Block a user