forked from Imagelibrary/rtems
2006-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h, sapi/src/posixapi.c, sapi/src/rtemsapi.c: Add Classic API Barriers and commented out hooks to initialize .
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* sapi/include/confdefs.h, sapi/src/posixapi.c, sapi/src/rtemsapi.c:
|
||||
Add Classic API Barriers and commented out hooks to initialize .
|
||||
|
||||
2006-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h,
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2002.
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -511,6 +511,10 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
|
||||
#define CONFIGURE_MAXIMUM_PERIODS 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_BARRIERS
|
||||
#define CONFIGURE_MAXIMUM_BARRIERS 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
|
||||
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
|
||||
#endif
|
||||
@@ -565,12 +569,15 @@ rtems_extensions_table Configuration_Initial_Extensions[] = {
|
||||
#include <signal.h>
|
||||
#include <limits.h>
|
||||
#include <mqueue.h>
|
||||
#include <rtems/posix/barrier.h>
|
||||
#include <rtems/posix/cond.h>
|
||||
#include <rtems/posix/mqueue.h>
|
||||
#include <rtems/posix/mutex.h>
|
||||
#include <rtems/posix/key.h>
|
||||
#include <rtems/posix/psignal.h>
|
||||
#include <rtems/posix/rwlock.h>
|
||||
#include <rtems/posix/semaphore.h>
|
||||
#include <rtems/posix/spinlock.h>
|
||||
#include <rtems/posix/threadsup.h>
|
||||
#include <rtems/posix/timer.h>
|
||||
|
||||
@@ -606,6 +613,18 @@ rtems_extensions_table Configuration_Initial_Extensions[] = {
|
||||
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS
|
||||
#define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
|
||||
#define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS
|
||||
#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
|
||||
|
||||
#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
|
||||
@@ -679,12 +698,31 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
||||
( sizeof( POSIX_Message_queue_Control) + \
|
||||
CONFIGURE_OBJECT_TABLE_STUFF + \
|
||||
NAME_MAX ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
|
||||
((_semaphores) * \
|
||||
( sizeof( POSIX_Semaphore_Control) + \
|
||||
CONFIGURE_OBJECT_TABLE_STUFF + \
|
||||
NAME_MAX ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_semaphores) \
|
||||
((_semaphores) * \
|
||||
( sizeof( POSIX_Barrier_Control) + \
|
||||
CONFIGURE_OBJECT_TABLE_STUFF + \
|
||||
NAME_MAX ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
|
||||
((_spinlocks) * \
|
||||
( sizeof( POSIX_Spinlock_Control) + \
|
||||
CONFIGURE_OBJECT_TABLE_STUFF + \
|
||||
NAME_MAX ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
|
||||
((_rwlocks) * \
|
||||
( sizeof( POSIX_RWLock_Control) + \
|
||||
CONFIGURE_OBJECT_TABLE_STUFF + \
|
||||
NAME_MAX ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX \
|
||||
( \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
|
||||
@@ -697,11 +735,14 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
|
||||
CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \
|
||||
CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
|
||||
CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \
|
||||
CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \
|
||||
(CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
|
||||
)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_THREADS 0
|
||||
@@ -947,6 +988,10 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
|
||||
( (_periods) * \
|
||||
( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
|
||||
( (_barriers) * \
|
||||
( sizeof(Barrier_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
|
||||
( (_extensions) * \
|
||||
( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
|
||||
@@ -1038,6 +1083,7 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
|
||||
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
|
||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
||||
CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \
|
||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
|
||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
|
||||
CONFIGURE_STACK_CHECKER_EXTENSION ) + \
|
||||
@@ -1088,6 +1134,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
|
||||
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
|
||||
CONFIGURE_MAXIMUM_PORTS,
|
||||
CONFIGURE_MAXIMUM_PERIODS,
|
||||
CONFIGURE_MAXIMUM_BARRIERS,
|
||||
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
||||
CONFIGURE_INIT_TASK_TABLE
|
||||
};
|
||||
@@ -1104,6 +1151,9 @@ posix_api_configuration_table Configuration_POSIX_API = {
|
||||
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
|
||||
CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
|
||||
CONFIGURE_MAXIMUM_POSIX_BARRIERS,
|
||||
CONFIGURE_MAXIMUM_POSIX_RWLOCKS,
|
||||
CONFIGURE_MAXIMUM_POSIX_SPINLOCKS,
|
||||
CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
|
||||
CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
|
||||
};
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <mqueue.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/object.h>
|
||||
#include <rtems/posix/barrier.h>
|
||||
#include <rtems/posix/cond.h>
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/posix/key.h>
|
||||
@@ -41,8 +42,10 @@
|
||||
#include <rtems/posix/priority.h>
|
||||
#include <rtems/posix/psignal.h>
|
||||
#include <rtems/posix/pthread.h>
|
||||
#include <rtems/posix/rwlock.h>
|
||||
#include <rtems/posix/timer.h>
|
||||
#include <rtems/posix/semaphore.h>
|
||||
#include <rtems/posix/spinlock.h>
|
||||
#include <rtems/posix/time.h>
|
||||
|
||||
/*PAGE
|
||||
@@ -62,6 +65,9 @@ posix_api_configuration_table _POSIX_Default_configuration = {
|
||||
0, /* number_of_initialization_threads */
|
||||
0, /* maximum_message_queues */
|
||||
0, /* maximum_semaphores */
|
||||
0, /* maximum_barriers */
|
||||
0, /* maximum_spinlocks */
|
||||
0, /* maximum_rwlocks */
|
||||
NULL /* User_initialization_threads_table */
|
||||
};
|
||||
|
||||
@@ -112,7 +118,16 @@ void _POSIX_API_Initialize(
|
||||
api_configuration->maximum_semaphores
|
||||
);
|
||||
|
||||
_POSIX_Timer_Manager_initialization ( api_configuration->maximum_timers );
|
||||
_POSIX_Timer_Manager_initialization( api_configuration->maximum_timers );
|
||||
|
||||
/* temporary while working */
|
||||
#if 0
|
||||
_POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
|
||||
|
||||
_POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
|
||||
|
||||
_POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <rtems/rtems/rtemsapi.h>
|
||||
|
||||
#include <rtems/rtems/intr.h>
|
||||
#include <rtems/rtems/barrier.h>
|
||||
#include <rtems/rtems/clock.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
#include <rtems/rtems/dpmem.h>
|
||||
@@ -96,6 +97,8 @@ void _RTEMS_API_Initialize(
|
||||
_Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
|
||||
|
||||
_Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
|
||||
|
||||
_Barrier_Manager_initialization( api_configuration->maximum_barriers );
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
||||
Reference in New Issue
Block a user