* sapi/include/confdefs.h: New define CONFIGURE_SEMAPHORES for the
	overall count of required semaphores.  New define
	CONFIGURE_LIBBLOCK_SEMAPHORES for the count of required disk and bdbuf
	semaphores.
This commit is contained in:
Sebastian Huber
2010-05-03 09:13:36 +00:00
parent bd878476b5
commit b2f216e14f
2 changed files with 29 additions and 10 deletions

View File

@@ -1,3 +1,10 @@
2010-05-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
* sapi/include/confdefs.h: New define CONFIGURE_SEMAPHORES for the
overall count of required semaphores. New define
CONFIGURE_LIBBLOCK_SEMAPHORES for the count of required disk and bdbuf
semaphores.
2010-05-01 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Add missing "&&".

View File

@@ -784,11 +784,25 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_BDBUF_BUFFER_MAX_SIZE
};
#endif
/*
* Semaphores:
* o disk lock
* o bdbuf lock
* o bdbuf sync lock
* o bdbuf access condition
* o bdbuf transfer condition
* o bdbuf buffer condition
*/
#define CONFIGURE_LIBBLOCK_SEMAPHORES 6
#if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \
defined(CONFIGURE_BDBUF_BUFFER_COUNT)
#error BDBUF Cache does not use a buffer configuration table. Please remove.
#endif
#else
#define CONFIGURE_LIBBLOCK_SEMAPHORES 0
#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
#if defined(RTEMS_MULTIPROCESSING)
@@ -909,16 +923,17 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
#define CONFIGURE_MAXIMUM_SEMAPHORES 0
#else
#endif
#define CONFIGURE_SEMAPHORES \
(CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES)
/*
* If there are no user or support semaphores defined, then we can assume
* that no memory need be allocated at all for semaphores.
*/
#if ((CONFIGURE_MAXIMUM_SEMAPHORES == 0) && \
(CONFIGURE_LIBIO_SEMAPHORES == 0) && \
(CONFIGURE_TERMIOS_SEMAPHORES == 0))
#if CONFIGURE_SEMAPHORES == 0
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
#else
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
@@ -1686,8 +1701,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
(CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES) + \
CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \
CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES) + \
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
@@ -1780,8 +1794,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES),
CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES +
CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES),
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES),
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES),
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS),
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
@@ -1853,8 +1866,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_MAXIMUM_TASKS,
CONFIGURE_NOTEPADS_ENABLED,
CONFIGURE_MAXIMUM_TIMERS + CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER,
CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
CONFIGURE_TERMIOS_SEMAPHORES,
CONFIGURE_SEMAPHORES,
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
CONFIGURE_MAXIMUM_PARTITIONS,
CONFIGURE_MAXIMUM_REGIONS,