mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 11:00:08 +08:00
2010-06-19 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sapi/include/confdefs.h: Add CONFIGURE_MAXIMUM_FIFOS to account for resources per FIFO instance.
This commit is contained in:
@@ -287,12 +287,20 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
{ RTEMS_FILESYSTEM_TYPE_MINIIMFS, miniIMFS_initialize }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* It should be called FIFOs not pipes
|
||||
*/
|
||||
#if defined(CONFIGURE_PIPES_ENABLED)
|
||||
#define CONFIGURE_FIFOS_ENABLED
|
||||
#warning "Use CONFIGURE_FIFOS_ENABLED not CONFIGURE_PIPES_ENABLED"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This defines the IMFS file system table entry.
|
||||
*/
|
||||
#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
|
||||
defined(CONFIGURE_FILESYSTEM_IMFS)
|
||||
#if defined(CONFIGURE_PIPES_ENABLED)
|
||||
#if defined(CONFIGURE_FIFOS_ENABLED)
|
||||
#define CONFIGURE_FILESYSTEM_ENTRY_IMFS \
|
||||
{ RTEMS_FILESYSTEM_TYPE_IMFS, fifoIMFS_initialize }
|
||||
#else
|
||||
@@ -301,6 +309,20 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This sets up the resources for the PIPES/FIFOs
|
||||
*/
|
||||
#if defined(CONFIGURE_FIFOS_ENABLED)
|
||||
#if !defined(CONFIGURE_MAXIMUM_FIFOS)
|
||||
#error "FIFOs enabled but no FIFOs configured."
|
||||
#endif
|
||||
#define CONFIGURE_BARRIERS_FOR_FIFOS (2 * CONFIGURE_MAXIMUM_FIFOS)
|
||||
#define CONFIGURE_SEMAPHORES_FOR_FIFOS (1 + CONFIGURE_MAXIMUM_FIFOS)
|
||||
#else
|
||||
#define CONFIGURE_BARRIERS_FOR_FIFOS 0
|
||||
#define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEVFS
|
||||
*/
|
||||
@@ -1132,7 +1154,8 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
|
||||
#define CONFIGURE_SEMAPHORES \
|
||||
(CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
|
||||
CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES)
|
||||
CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
|
||||
CONFIGURE_SEMAPHORES_FOR_FIFOS)
|
||||
|
||||
/*
|
||||
* If there are no user or support semaphores defined, then we can assume
|
||||
@@ -1187,6 +1210,12 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_BARRIERS
|
||||
#define CONFIGURE_MAXIMUM_BARRIERS 0
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_BARRIERS \
|
||||
(CONFIGURE_MAXIMUM_BARRIERS + CONFIGURE_BARRIERS_FOR_FIFOS)
|
||||
|
||||
#if CONFIGURE_BARRIERS == 0
|
||||
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
|
||||
#else
|
||||
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
|
||||
@@ -1727,7 +1756,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
|
||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
||||
CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \
|
||||
CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS) + \
|
||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
|
||||
)
|
||||
|
||||
@@ -1808,7 +1837,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
|
||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
|
||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
|
||||
CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS),
|
||||
CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS),
|
||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
@@ -1865,7 +1894,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
CONFIGURE_MAXIMUM_REGIONS,
|
||||
CONFIGURE_MAXIMUM_PORTS,
|
||||
CONFIGURE_MAXIMUM_PERIODS,
|
||||
CONFIGURE_MAXIMUM_BARRIERS,
|
||||
CONFIGURE_BARRIERS,
|
||||
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
||||
CONFIGURE_INIT_TASK_TABLE
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user