From deae06a694dd31c06cacca4e04b9f41100c4e548 Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Fri, 23 Jan 2009 20:21:41 +0000 Subject: [PATCH] Reduce RTEMS stack sizes. Use new RTEMS 'unified memory pools'. --- configure/os/CONFIG_SITE.Common.RTEMS | 6 +++--- configure/os/CONFIG_SITE.darwin-ppc.Common | 2 +- configure/os/CONFIG_SITE.darwin-ppcx86.Common | 1 + configure/os/CONFIG_SITE.darwin-x86.Common | 2 +- configure/os/CONFIG_SITE.linux-x86.Common | 2 +- configure/os/CONFIG_SITE.linux-x86.linux-x86 | 1 + configure/os/CONFIG_SITE.solaris-sparc.Common | 2 +- src/RTEMS/base/rtems_config.c | 4 ++-- src/libCom/osi/os/RTEMS/osdThread.c | 8 ++++---- 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/configure/os/CONFIG_SITE.Common.RTEMS b/configure/os/CONFIG_SITE.Common.RTEMS index 68a8e878f..c37dcc248 100644 --- a/configure/os/CONFIG_SITE.Common.RTEMS +++ b/configure/os/CONFIG_SITE.Common.RTEMS @@ -5,8 +5,8 @@ # Where to find RTEMS # -RTEMS_BASE=/usr/local/rtems/rtems-4.9 -RTEMS_VERSION=4.9 +RTEMS_BASE=/usr/local/rtems/rtems-4.10 +RTEMS_VERSION=4.10 # If you're using neither BOOTP/DHCP nor FLASH to pick up your IOC @@ -18,4 +18,4 @@ RTEMS_VERSION=4.9 # # Specify your desired command-line-input library # -COMMANDLINE_LIBRARY = EPICS +COMMANDLINE_LIBRARY = READLINE diff --git a/configure/os/CONFIG_SITE.darwin-ppc.Common b/configure/os/CONFIG_SITE.darwin-ppc.Common index 3bd24bc00..5d3e000d6 100644 --- a/configure/os/CONFIG_SITE.darwin-ppc.Common +++ b/configure/os/CONFIG_SITE.darwin-ppc.Common @@ -6,4 +6,4 @@ # Site override definitions for darwin-ppc host builds #------------------------------------------------------- -CROSS_COMPILER_TARGET_ARCHS = # RTEMS-uC5282 RTEMS-mvme5500 RTEMS-mvme2100 +CROSS_COMPILER_TARGET_ARCHS = # RTEMS-uC5282 # RTEMS-mvme5500 RTEMS-mvme2100 diff --git a/configure/os/CONFIG_SITE.darwin-ppcx86.Common b/configure/os/CONFIG_SITE.darwin-ppcx86.Common index 88249f6c0..b8be33360 100644 --- a/configure/os/CONFIG_SITE.darwin-ppcx86.Common +++ b/configure/os/CONFIG_SITE.darwin-ppcx86.Common @@ -10,3 +10,4 @@ # Need this to get OS X readline rather than Fink (PPC-only) readline # OP_SYS_LDFLAGS += -L/usr/lib +OP_SYS_CFLAGS += -g diff --git a/configure/os/CONFIG_SITE.darwin-x86.Common b/configure/os/CONFIG_SITE.darwin-x86.Common index 5d3e000d6..ccaddcacc 100644 --- a/configure/os/CONFIG_SITE.darwin-x86.Common +++ b/configure/os/CONFIG_SITE.darwin-x86.Common @@ -6,4 +6,4 @@ # Site override definitions for darwin-ppc host builds #------------------------------------------------------- -CROSS_COMPILER_TARGET_ARCHS = # RTEMS-uC5282 # RTEMS-mvme5500 RTEMS-mvme2100 +CROSS_COMPILER_TARGET_ARCHS = RTEMS-uC5282 RTEMS-mvme3100 # RTEMS-mvme167 # RTEMS-beatnik RTEMS-mvme2100 diff --git a/configure/os/CONFIG_SITE.linux-x86.Common b/configure/os/CONFIG_SITE.linux-x86.Common index b829d62ff..47c06cbcd 100644 --- a/configure/os/CONFIG_SITE.linux-x86.Common +++ b/configure/os/CONFIG_SITE.linux-x86.Common @@ -9,4 +9,4 @@ # JBA test override values #CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc #CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 -#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167 +CROSS_COMPILER_TARGET_ARCHS = linux-xscale_be # RTEMS-uC5282 RTEMS-mvme3100 # RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167 diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/configure/os/CONFIG_SITE.linux-x86.linux-x86 index 2e58e2d8b..d6b1f732e 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-x86 +++ b/configure/os/CONFIG_SITE.linux-x86.linux-x86 @@ -5,3 +5,4 @@ # Site specific definitions for linux-x86 host - linux-x86 target builds #------------------------------------------------------- +USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES diff --git a/configure/os/CONFIG_SITE.solaris-sparc.Common b/configure/os/CONFIG_SITE.solaris-sparc.Common index bbc92c5f6..d0b9aa997 100644 --- a/configure/os/CONFIG_SITE.solaris-sparc.Common +++ b/configure/os/CONFIG_SITE.solaris-sparc.Common @@ -7,4 +7,4 @@ #INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew -#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040 +CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040 vxWorks-ppc604_long diff --git a/src/RTEMS/base/rtems_config.c b/src/RTEMS/base/rtems_config.c index 479f07397..980a338ce 100644 --- a/src/RTEMS/base/rtems_config.c +++ b/src/RTEMS/base/rtems_config.c @@ -20,16 +20,16 @@ *********************************************************************** */ +#define CONFIGURE_UNIFIED_WORK_AREAS #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_EXECUTIVE_RAM_SIZE (2000*1024) #define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(30) #define CONFIGURE_MAXIMUM_SEMAPHORES rtems_resource_unlimited(500) #define CONFIGURE_MAXIMUM_TIMERS rtems_resource_unlimited(20) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES rtems_resource_unlimited(5) #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1 -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 100 +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 150 #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM #define CONFIGURE_MAXIMUM_DRIVERS 8 diff --git a/src/libCom/osi/os/RTEMS/osdThread.c b/src/libCom/osi/os/RTEMS/osdThread.c index 142163c16..73a110b13 100644 --- a/src/libCom/osi/os/RTEMS/osdThread.c +++ b/src/libCom/osi/os/RTEMS/osdThread.c @@ -126,11 +126,11 @@ epicsShareFunc epicsThreadBooleanStatus epicsShareAPI epicsThreadHighestPriority unsigned int epicsThreadGetStackSize (epicsThreadStackSizeClass size) { - unsigned int stackSize = 16000; + unsigned int stackSize = 11000; switch(size) { - case epicsThreadStackSmall: stackSize = 8000; break; - case epicsThreadStackMedium: stackSize = 12000; break; - case epicsThreadStackBig: break; + case epicsThreadStackSmall: stackSize = 5000; break; + case epicsThreadStackMedium: stackSize = 8000; break; + case epicsThreadStackBig: break; default: errlogPrintf("epicsThreadGetStackSize illegal argument"); break;