summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-17 02:46:34 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-17 02:46:34 +0000
commitb2d2a5df3c3e5a71aa2348755c8c72e7f74fb435 (patch)
treed7fb8e079f66272374512a9b951936206f8f69b9
parent25fed67cccb91808846a26deb63e53b284937fc5 (diff)
downloadATCD-b2d2a5df3c3e5a71aa2348755c8c72e7f74fb435.tar.gz
pSOSim port
-rw-r--r--ace/config-psosim-g++.h242
-rw-r--r--ace/sys_conf.h380
-rw-r--r--include/makeinclude/platform_psosim_g++.GNU57
-rw-r--r--psosim/Makefile76
-rw-r--r--psosim/drv_conf.c79
-rwxr-xr-xtests/run_tests.psosim163
6 files changed, 997 insertions, 0 deletions
diff --git a/ace/config-psosim-g++.h b/ace/config-psosim-g++.h
new file mode 100644
index 00000000000..9285287665e
--- /dev/null
+++ b/ace/config-psosim-g++.h
@@ -0,0 +1,242 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for pSOSim on SunOS5
+// using the GNU/Cygnus g++ 2.7.2 compiler, without repo patch.
+
+///////////////////////////////////////////////////////////////////////////////
+// * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * //
+// //
+// Because pSOSim includes UNIX system header files in order to do //
+// its emulation of pSOSystSem on Solaris, there are a number of //
+// things that are "available" to ACE on pSOSim that are *not* //
+// really available on pSOSystem. Every effort has been made to //
+// avoid dependencies on these "features" in the ACE pSOSim port, //
+// which has in turn necessarily required pSOSim specific definitions. //
+// //
+// To ease portability between pSOSim and pSOSystem, the definitions //
+// in this file have been separated into three groups: those that //
+// are known to be appropriate for both pSOSim and pSOSystem, those //
+// known to be appropriate for pSOSim but (probably) not for pSOSystem, //
+// and those that are (probably) appropriate for pSOSystem, but are //
+// not appropriate for pSOSim. //
+// //
+// When porting from pSOSim to pSOSystem, it is (probably) a good //
+// idea to leave the definitions in the first category alone, //
+// comment out the definitions in the second category, and uncomment //
+// the definitions in the third category. Additional definitions //
+// may need to be added to the third category, as only those that //
+// were encountered during the pSOSim port were added (that is, one //
+// of the system files included by pSOSim could be compensating for //
+// a definition pSOSystem really needs. //
+// //
+// * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#if !defined (ACE_CONFIG_H)
+#define ACE_CONFIG_H
+
+////////////////////////////////////////////////////////////////
+// //
+// Definitions appropriate for both pSOSim and pSOSystem //
+// //
+////////////////////////////////////////////////////////////////
+
+#if ! defined (__ACE_INLINE__)
+# define __ACE_INLINE__
+#endif /* ! __ACE_INLINE__ */
+
+
+#define ACE_HAS_IP_MULTICAST
+
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+/* #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
+
+// #define ACE_LACKS_U_LONG_LONG
+
+#define ACE_LACKS_HRTIME_T
+
+// #define ACE_LACKS_EVENT_T
+
+#define ACE_HAS_VERBOSE_NOTSUP
+
+#define ACE_LACKS_MEMORY_H
+
+#define ACE_LACKS_MALLOC_H
+
+#define ACE_LACKS_MMAP
+
+#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
+
+#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
+
+#define ACE_LACKS_SEMBUF_T
+
+#define ACE_LACKS_EXEC
+
+#define ACE_LACKS_FORK
+
+
+// rename the main entry point
+#define ACE_MAIN extern "C" void root
+
+// All this is commented out for the single threaded port
+/*
+
+#define ACE_HAS_THREADS
+
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+#endif
+
+#define ACE_DEFAULT_THREAD_KEYS 256
+
+#define ACE_HAS_MT_SAFE_SOCKETS
+
+#define ACE_LACKS_COND_T
+
+
+*/
+
+#define ACE_HAS_TSS_EMULATION
+
+
+////////////////////////////////////////////////////////////////
+// //
+// Definitions appropriate for pSOSim but not pSOSystem //
+// //
+////////////////////////////////////////////////////////////////
+
+#define ACE_HAS_POSIX_TIME
+
+////////////////////////////////////////////////////////////////
+// //
+// Definitions appropriate for pSOSystem but not pSOSim //
+// //
+////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////
+// //
+// Definitions that have not been categorized //
+// //
+////////////////////////////////////////////////////////////////
+
+
+#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
+
+/* #define ACE_HAS_BROKEN_SENDMSG */
+
+/* #define ACE_HAS_BROKEN_WRITEV */
+
+#define ACE_HAS_CHARPTR_SOCKOPT
+
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#define ACE_HAS_MSG
+
+#define ACE_HAS_POSIX_NONBLOCK
+
+#define ACE_HAS_SIGINFO_T
+
+#define ACE_HAS_SIGWAIT
+
+#define ACE_HAS_SIG_ATOMIC_T
+
+#define ACE_HAS_STRERROR
+
+#define ACE_LACKS_ACCESS
+
+#define ACE_LACKS_GETSERVBYNAME
+
+#define ACE_LACKS_IOSTREAM_FX
+
+#define ACE_LACKS_KEY_T
+
+#define ACE_LACKS_LINEBUFFERED_STREAMBUF
+
+#define ACE_LACKS_MADVISE
+
+#define ACE_LACKS_MKTEMP
+
+#define ACE_LACKS_MPROTECT
+
+#define ACE_LACKS_MSYNC
+
+#define ACE_LACKS_PARAM_H
+
+#define ACE_LACKS_PWD_FUNCTIONS
+
+#define ACE_LACKS_RLIMIT
+
+#define ACE_LACKS_RPC_H
+
+#define ACE_LACKS_RWLOCK_T
+
+#define ACE_LACKS_SBRK
+
+#define ACE_LACKS_SIGINFO_H
+
+#define ACE_LACKS_SIGNED_CHAR
+
+#define ACE_LACKS_SI_ADDR
+
+#define ACE_LACKS_SOCKETPAIR
+
+#define ACE_LACKS_STRCASECMP
+
+#define ACE_LACKS_STRRECVFD
+
+#define ACE_LACKS_SYSCALL
+
+#define ACE_LACKS_SYSV_MSG_H
+
+#define ACE_LACKS_SYSV_SHMEM
+
+#define ACE_LACKS_SYS_NERR
+
+#define ACE_LACKS_TIMESPEC_T
+
+#define ACE_LACKS_UCONTEXT_H
+
+#define ACE_LACKS_UNIX_SIGNALS
+
+#define ACE_LACKS_UTSNAME_T
+
+// #define ACE_MALLOC_ALIGN 8
+// #define ACE_NEEDS_SYSTIME_H
+
+#define ACE_PAGE_SIZE 4096
+
+#define ACE_HAS_BROKEN_EXPLICIT_TEMPLATE_DESTRUCTOR
+
+#define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
+
+#define ACE_HAS_TEMPLATE_SPECIALIZATION
+
+#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
+
+#define ACE_TEMPLATES_REQUIRE_SOURCE
+
+#if !defined (ACE_NTRACE)
+# define ACE_NTRACE 1
+#endif /* ACE_NTRACE */
+
+#if !defined (ACE_PSOS)
+#define ACE_PSOS
+#endif /* ACE_PSOS */
+
+#if !defined (ACE_PSOSIM)
+#define ACE_PSOSIM
+#endif /* ACE_PSOSIM */
+
+#if !defined (ACE_PSOS_TBD)
+#define ACE_PSOS_TBD
+#endif /* ACE_PSOS_TBD */
+
+
+#endif /* ACE_CONFIG_H */
diff --git a/ace/sys_conf.h b/ace/sys_conf.h
new file mode 100644
index 00000000000..cbf778030bf
--- /dev/null
+++ b/ace/sys_conf.h
@@ -0,0 +1,380 @@
+/* ============================================================================ */
+/* */
+/* -*- C++ -*- */
+/* $Id$ */
+/* */
+/* ============================================================================ */
+/* */
+/* = LIBRARY */
+/* ace */
+/* */
+/* = FILENAM */
+/* sys_conf.h (definitions for pSOSim and pSOSystem configuration) */
+/* */
+/* = AUTHOR */
+/* Chris Gill */
+/* */
+/* ============================================================================ */
+
+#ifndef _SYS_CONF_H
+#define _SYS_CONF_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/***********************************************************************/
+/* */
+/* These symbols are used to define other symbols in this file. */
+/* They should never be changed. */
+/* */
+/***********************************************************************/
+#define YES 1
+#define NO 0
+
+#define USE_RARP 0
+
+#define DBG_SA 1 /* Standalone pROBE debugging */
+#define DBG_XS 2 /* XRAY+ via RS-232 */
+#define DBG_XN 3 /* XRAY+ via network */
+#define DBG_AP 4 /* Run application (w/ pROBE in standalone mode) */
+
+#define STORAGE 5 /* Get SD_'s from storage area */
+#define SYS_CONF 6 /* Get SD_'s from #defines set in this file */
+
+
+/***********************************************************************/
+/* */
+/* B A S I C P A R A M E T E R S */
+/* */
+/* The parameters in this section determine the fashion in which */
+/* many of the other parameters in this file will be used. */
+/* */
+/* Many of the parameters in this file have names beginning with */
+/* either "SC_" or "SD_". Those beginning with "SC_" are ALWAYS */
+/* controlled by the values you set in this file. The values of */
+/* the "SD_" parameters can be determined either by the definitions */
+/* given in this file, or by the data found in the target board's */
+/* parameter storage area. SC_SD_PARAMETERS determines this. If */
+/* SC_SD_PARAMETERS is "SYS_CONF", then the values given in this */
+/* file will be used for the SD_ parameters. If SC_SD_PARAMETERS */
+/* is "STORAGE", then pSOSystem will attempt to use the values found */
+/* in the board's parameter storage area for the SD_ variables. If */
+/* the parameter storage area has not been initialized or has been */
+/* corrupted, then the values given in this file will be used. They */
+/* will also be written to the storage area. */
+/* */
+/* If SC_SD_PARAMETERS is STORAGE, you may enable a "startup dialog" */
+/* which will allow you to view, and optionally change, the */
+/* parameter values found in the storage area. The dialog is enabled */
+/* by setting SC_STARTUP_DIALOG to YES. In this case, */
+/* SD_STARTUP_DELAY specifies the number of seconds that the dialog */
+/* will wait for input before proceeding to boot the system. */
+/* */
+/* SE_DEBUG_MODE determines how the system will operate, as follows: */
+/* */
+/* DBG_SA: Boot pROBE+ in standalone mode. */
+/* */
+/* DBG_XS: Boot into pROBE+ and wait for the host debugger (XRAY+) */
+/* via a serial connection */
+/* */
+/* DBG_XN: Boot into pROBE+ and wait for the host debugger (XRAY+) */
+/* via a network connection */
+/* */
+/* STORAGE: Use the mode (DBG_SA, DBG_XS, or DBG_XN) found in the */
+/* parameter storage area. If a valid mode is not found, */
+/* then use DBG_SA. */
+/* */
+/***********************************************************************/
+#define SC_SD_PARAMETERS STORAGE
+#define SC_STARTUP_DIALOG NO
+#define SD_STARTUP_DELAY 60
+#define SE_DEBUG_MODE STORAGE
+
+/***********************************************************************/
+/* */
+/* O P E R A T I N G S Y S T E M C O M P O N E N T S */
+/* */
+/* Setting the definition line to YES will cause that component to */
+/* be built into the system. NO means the component will NOT be */
+/* put into the system. It is an error to specify both SC_PSOS */
+/* and SC_PSOSM as present! */
+/* */
+/***********************************************************************/
+#define SC_PSOS YES /* pSOS+ real-time kernel */
+#define SC_PSOSM NO /* pSOS+ real-time multiprocessing kernel */
+#define SC_PROBE YES /* pROBE+ system-level debugger */
+#define SC_PHILE NO /* pHILE+ file system manager */
+#define SC_PREPC YES /* pREPC+ C run-time library */
+#define SC_PNA YES /* pNA+ TCP/IP networking manager */
+#define SC_PRPC NO /* pRPC+ RPC component */
+#define SC_PX NO /* pX+ X-windows client */
+#define SC_PSE NO /* pSE+ STREAMS component */
+#define SC_PTLI NO /* pTLI TLI component */
+
+
+/***********************************************************************/
+/* */
+/* S E R I A L C H A N N E L C O N F I G U R A T I O N */
+/* */
+/* * SC_DEF_BAUD specifies the default baud rate to be used for */
+/* the serial channels */
+/* * SC_APP_CONSOLE specifies the serial channel number (starting */
+/* from 1) which should be used for the application's "console". */
+/* * SC_PROBE_CONSOLE specifies the serial channel number (starting */
+/* from 1) which pROBE+ should use to display output and receive */
+/* commands, or to communicate with XRAY+ over. */
+/* * SC_PROBE_HOST specifies the serial channel number (starting */
+/* from 1) which should be used for the pROBE+ "host" channel. */
+/* This is not normally required, so it can be disabled by */
+/* using a value of 0. The host channel is explained in the */
+/* pROBE+ User's Manual. */
+/* */
+/***********************************************************************/
+#define SD_DEF_BAUD 9600
+#define SC_APP_CONSOLE 1
+#define SC_PROBE_CONSOLE 1
+#define SC_PROBE_HOST 0
+
+
+/***********************************************************************/
+/* */
+/* L A N C O N F I G U R A T I O N */
+/* */
+/* */
+/***********************************************************************/
+#define SD_LAN1 YES
+#define SD_LAN1_IP 0x80FCA58C
+#define SD_LAN1_SUBNET_MASK 0
+#define SC_LAN1_BUFFS 40
+
+/***********************************************************************/
+/* */
+/* S H A R E D M E M O R Y C O N F I G U R A T I O N */
+/* */
+/* */
+/***********************************************************************/
+/*---------------------------------------------------------------------*/
+/* If you want to build a Shared Memory Interface for the network or */
+/* multi-processing pSOS+m, set SD_SM_NODE (a non-zero value) to the */
+/* node number of THIS node. */
+/*---------------------------------------------------------------------*/
+#define SD_SM_NODE 0
+
+/*---------------------------------------------------------------------*/
+/* Shared memory network interface */
+/*---------------------------------------------------------------------*/
+#define SD_NISM NO
+#define SD_NISM_IP 0x00000000
+#define SD_NISM_DIRADDR 0x300000
+#define SC_NISM_BUFFS 30
+#define SC_NISM_LEVEL 2
+#define SD_NISM_SUBNET_MASK 0
+
+
+/*---------------------------------------------------------------------*/
+/* If you want to build a multi-node pSOS+m system, set SD_KISM */
+/* to the number of nodes in the system. */
+/*---------------------------------------------------------------------*/
+#define SD_KISM NO
+#define SD_KISM_DIRADDR 0x1000400
+
+
+/***********************************************************************/
+/* */
+/* M I S C E L L A N E O U S N E T W O R K I N G */
+/* P A R A M E T E R S */
+/* */
+/***********************************************************************/
+#define SD_DEF_GTWY_IP 0
+
+
+/***********************************************************************/
+/* */
+/* B U S C O N F I G U R A T I O N */
+/* */
+/* */
+/***********************************************************************/
+#define SD_VME_BASE_ADDR 0x01000000
+
+
+/***********************************************************************/
+/* SC_RAM_SIZE */
+/* */
+/* Normally, pSOSystem uses ALL of the memory remaining on a board */
+/* for dynamic allocation ("region 0"). You may override this by */
+/* setting SC_RAM_SIZE to a non-zero value. If you do, pSOSystem will */
+/* not touch any memory after address (BSP_RAM_BASE + SC_RAM_SIZE - 1).*/
+/* */
+/* NOTE: This is usefull when the building a BOOT ROM you and want to */
+/* make sure it does not "over flow" into the space you are putting */
+/* the download code. */
+/***********************************************************************/
+#define SC_RAM_SIZE 0x800000
+
+/***********************************************************************/
+/* */
+/* I / O D E V I C E S */
+/* */
+/* Each device may be included in the system by specifying a major */
+/* number for it, which determines its slot in the pSOS+ I/O switch */
+/* table. To leave a device driver out of the system, use NO for */
+/* the major number. */
+/* */
+/* Note the following: */
+/* * Major device 0 is reserved and cannot be used for any of these */
+/* devices. Setting a device number to 0 here is the same as NO. */
+/* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may */
+/* be increased, if desired) */
+/* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, */
+/* should not be changed. These are for use by application */
+/* programs as the "device number" parameter on de_* calls. */
+/* */
+/***********************************************************************/
+#define SC_DEV_SERIAL 1 /* Serial driver */
+#define SC_DEV_TIMER 2 /* Periodic tick timer */
+#define SC_DEV_RAMDISK NO /* RAM disk */
+#define SC_DEV_TFTP NO /* TFTP pseudo driver */
+#define SC_DEV_SCSI NO /* SCSI bus */
+#define SC_DEV_DLPI NO
+#define SC_DEVMAX 6 /* Maximum device number */
+
+#define DEV_SERIAL (SC_DEV_SERIAL << 16)
+#define DEV_TIMER (SC_DEV_TIMER << 16)
+#define DEV_RAMDISK (SC_DEV_RAMDISK << 16)
+#define DEV_SCSI (SC_DEV_SCSI << 16)
+#define DEV_TFTP (SC_DEV_TFTP << 16)
+#define DEV_DLPI (SC_DEV_DLPI << 16)
+
+/***********************************************************************/
+/* */
+/* C O M P O N E N T C O N F I G U R A T I O N P A R A M E T E R S */
+/* */
+/* These parameters should work as is for this application. You */
+/* may want to change some of them if you start customizing this */
+/* application. */
+/* */
+/***********************************************************************/
+
+/*---------------------------------------------------------------------*/
+/* pSOS+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define KC_RN0USIZE 0x100 /* region 0 unit size */
+#define KC_NTASK 12 /* max number of tasks */
+#define KC_NQUEUE 10 /* max number of message queues */
+#define KC_NSEMA4 30 /* max number of semaphores */
+#define KC_NMSGBUF 100 /* max number of message buffers */
+#define KC_NTIMER 10 /* max number of timers */
+#define KC_NLOCOBJ 50 /* max number of local objects */
+
+/* note: because pSOSim *simulates* a realtime clock, this value is set */
+/* very low to avoid crazy skew between the simulated and real worlds */
+#define KC_TICKS2SEC 1000000 /* clock tick interrupt frequency */
+
+#define KC_TICKS2SLICE 10 /* time slice quantum, in ticks */
+#define KC_SYSSTK 0xFFFF /* pSOS+ system stack size (bytes) */
+#define KC_ROOTSSTK 0xFFFF /* ROOT supervisor stack size */
+#define KC_ROOTUSTK 0 /* ROOT user stack size */
+#define KC_ROOTMODE 0x2000 /* ROOT initial mode */
+#define KC_STARTCO 0 /* callout at task activation */
+#define KC_DELETECO 0 /* callout at task deletion */
+#define KC_SWITCHCO 0 /* callout at task switch */
+#define KC_FATAL 0 /* fatal error handler address */
+
+
+/*---------------------------------------------------------------------*/
+/* pSOS+m configuration parameters */
+/*---------------------------------------------------------------------*/
+
+#define MC_NGLBOBJ 8 /* sizeof global obj table in each node*/
+#define MC_NAGENT 10 /* number of RPC agents in this node */
+#define MC_FLAGS 0 /* operating mode flags */
+#define MC_ROSTER 0 /* addr of user roster change callout */
+#define MC_KIMAXBUF 100 /* maximum KI packet buffer length */
+#define MC_ASYNCERR 0 /* asynchronous calls error callout */
+
+/*---------------------------------------------------------------------*/
+/* pROBE+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define RC_BRKOPC 0x4E40 /* Instruction break opcode */
+#define RC_ILEVEL MAX_ILEV /* pROBE+ interrupt mask */
+#define RC_SMODE 0 /* Start mode */
+#define RC_FLAGS 0x0C /* Initial flag settings */
+
+/*---------------------------------------------------------------------*/
+/* pHILE+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define FC_LOGBSIZE 9 /* Block size (base-2 exponent) */
+#define FC_NBUF 6 /* Number of cache buffers */
+#define FC_NMOUNT 3 /* Max # of mounted volumes */
+#define FC_NFCB 10 /* Max # of opened files per system */
+#define FC_NCFILE 2 /* Max # of opened files per task */
+#define FC_MSDOS 1 /* MS-DOS volume mount flag */
+
+/*---------------------------------------------------------------------*/
+/* pREPC+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define LC_BUFSIZ 128 /* I/O buffer size */
+#define LC_NUMFILES 50 /* Max number of open files per task */
+#define LC_WAITOPT 0 /* Wait option for memory allocation */
+#define LC_TIMEOPT 0 /* Timeout option for mem allocation */
+#define LC_SSIZE 512 /* Size of print buffer */
+
+/*---------------------------------------------------------------------*/
+/* pNA+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define NC_NNI 5 /* size of pNA NI Table */
+#define NC_NROUTE 10 /* size of pNA Routing Table */
+#define NC_NARP 20 /* size of pNA ARP table */
+#define NC_DEFUID 0 /* Default User ID of a task */
+#define NC_DEFGID 0 /* Default Group ID of a task */
+#define NC_HOSTNAME "scg" /* Hostname of the node */
+#define NC_NHENTRY 8 /* Number of Host table entries */
+
+/*---------------------------------------------------------------------*/
+/* pSE+ configuration parameters */
+/*---------------------------------------------------------------------*/
+#define NBUFS_0 64 /* number of 0 length buffers */
+#define NBUFS_32 128 /* number of 32 byte buffers */
+#define NBUFS_64 128 /* number of 64 byte buffers */
+#define NBUFS_128 256 /* number of 128 byte buffers */
+#define NBUFS_256 32 /* number of 256 byte buffers */
+#define NBUFS_512 32 /* number of 512 byte buffers */
+#define NBUFS_1024 16 /* number of 1k byte buffers */
+#define NBUFS_2048 16 /* number of 2k byte buffers */
+#define NBUFS_4096 8 /* number of 4k byte buffers */
+#define SE_MAX_PSE_STRBUFS 9 /* max number of stream buffer types */
+
+#define SE_MAX_PSE_MODULES 2 /* max number of streams modules */
+#define SC_SHARE_NI NO /* does pna share NI with streams? */
+
+#define SE_DATA_SIZE 0x0C00 /* size of pSE data area */
+ /* (must be at least 3K) */
+#define SE_TASK_PRIO 250 /* priority for pSE task */
+#define SE_STACK_SIZE 0x2000 /* stack size for pSE task */
+#define SE_DEF_UID 0 /* default user id */
+#define SE_DEF_GID 0 /* default group id */
+#define SE_N_FDS 32 /* max # of system-wide */
+ /* stream descriptors */
+#define SE_N_TASKFDS 8 /* max # of per-task stream */
+ /* descriptors */
+#define SE_N_LINKS 32 /* max # of multiplexing links */
+#define SE_N_TIMEOUTS 32 /* max # of timeout requests */
+#define SE_N_BUFCALLS 32 /* max # of bufcall requests */
+#define SE_N_QUEUES 256 /* # of queues */
+#define SE_N_MBLKS 512 /* reserved for future use, must be 0 */
+
+/***********************************************************************/
+/* */
+/* This defines the IP address of the host system where the */
+/* "server" program should be running. */
+/* */
+/***********************************************************************/
+#define HOST_IP 0x80FCA58C
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _SYS_CONF_H */
+
diff --git a/include/makeinclude/platform_psosim_g++.GNU b/include/makeinclude/platform_psosim_g++.GNU
new file mode 100644
index 00000000000..d2c62859b00
--- /dev/null
+++ b/include/makeinclude/platform_psosim_g++.GNU
@@ -0,0 +1,57 @@
+# $Id$
+# PSOSim with GNU g++ 2.7.2
+
+####
+#### Notes:
+####
+#### 1) This file assumes that the PSS_ROOT environment variable is set.
+####
+#### 2) There is a separate Makefile in $(PSS_CFG_DIR) that must be used
+#### to create $(PSS_CFG_DIR)/acepsos.a
+####
+####
+
+CPU_FAMILY = psosim
+CPU = psosim
+CPU_TOOLS = psosim
+BOARD = psosim
+
+PSS_CFG_DIR = $(ACE_ROOT)/psosim
+PSS_SYS_DIR = $(PSS_ROOT)/sys/os
+PSS_SYS_LIBS = $(PSS_SYS_DIR)/prepc.a $(PSS_SYS_DIR)/psos.a $(PSS_SYS_DIR)/pna.a
+PSS_BSP = $(PSS_ROOT)/bsps/psosim
+PSS_BSP_LIB = $(PSS_BSP)/bsp.a
+
+debug = 1
+optimize = 1
+
+CC = gcc
+CXX = g++
+CFLAGS += -Wall -Wpointer-arith -pipe #### -Winline
+CCFLAGS += $(CFLAGS) -fno-implicit-templates
+
+# -w suppresses warnings
+# -H tells you which header files are being included
+# (switch between these)
+#DCFLAGS += -g
+#DCFLAGS += -g -H
+#DCFLAGS += -g -H -w
+DCFLAGS += -g -w
+
+DLD = $(CXX)
+LD = $(CXX)
+LDFLAGS += # -z muldefs
+LIBS += $(PSS_SYS_LIBS) $(PSS_BSP_LIB) $(PSS_CFG_DIR)/acepsos.a -lsocket -lnsl -lm
+OCFLAGS += -O2
+#OCFLAGS += -O0
+PIC = -fpic
+AR = ar
+ARFLAGS = rsuv
+RANLIB = @true
+SOFLAGS = -G $(CPPFLAGS)
+# SOBUILD - compile into .so directly
+SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
+PRELIB = @true
+INCLDIRS += -I$(PSS_ROOT)/include -I$(PSS_BSP) -I$(ACE_ROOT)/ace
+
+
diff --git a/psosim/Makefile b/psosim/Makefile
new file mode 100644
index 00000000000..0902651a0da
--- /dev/null
+++ b/psosim/Makefile
@@ -0,0 +1,76 @@
+#----------------------------------------------------------------------------
+#
+# $Id$
+#
+# Makefile for the pSOSim system object files
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# Local macros
+#----------------------------------------------------------------------------
+
+CPU_FAMILY = psosim
+CPU = psosim
+CPU_TOOLS = psosim
+BOARD = psosim
+
+PSS_CFG_DIR = $(ACE_ROOT)/psosim
+
+PSS_CFG_OBJS = $(PSS_CFG_DIR)/drv_conf.o $(PSS_CFG_DIR)/prepccfg.o $(PSS_CFG_DIR)/psoscfg.o $(PSS_CFG_DIR)/sysinit.o
+
+PSS_CONFIG = $(PSS_ROOT)/configs/std
+PSS_SYS_DIR = $(PSS_ROOT)/sys/os
+PSS_SYS_LIBS = $(PSS_SYS_DIR)/prepc.a $(PSS_SYS_DIR)/psos.a $(PSS_SYS_DIR)/pna.a
+PSS_BSP = $(PSS_ROOT)/bsps/psosim
+PSS_BSP_LIB = $(PSS_BSP)/bsp.a
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+
+# To build multiple executables in the same directory on AIX, it works
+# best to wipe out any previously-created tempinc directory.
+# The compiler/linker isn't too smart about instantiating templates...
+ifdef TEMPINCDIR
+COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc)
+endif
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+all : $(PSS_CFG_DIR)/acepsos.a
+
+$(PSS_CFG_DIR)/acepsos.a : $(PSS_CFG_OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+
+$(PSS_CFG_DIR)/sysinit.o : $(PSS_CONFIG)/sysinit.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/sysinit.c
+
+$(PSS_CFG_DIR)/prepccfg.o : $(PSS_CONFIG)/prepccfg.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/prepccfg.c
+
+$(PSS_CFG_DIR)/psoscfg.o : $(PSS_CONFIG)/psoscfg.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/psoscfg.c
+
+$(PSS_CFG_DIR)/drv_conf.o : $(PSS_CFG_DIR)/drv_conf.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CFG_DIR)/drv_conf.c
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/psosim/drv_conf.c b/psosim/drv_conf.c
new file mode 100644
index 00000000000..3228920df6a
--- /dev/null
+++ b/psosim/drv_conf.c
@@ -0,0 +1,79 @@
+/***********************************************************************/
+/* */
+/* MODULE: drv_conf.c */
+/* DATE: 94/01/06 */
+/* PURPOSE: pSOSystem driver configuration and initialization */
+/* */
+/* There is one function in this file: */
+/* */
+/* SetUpDrivers to setup drivers except for Network drivers */
+/* */
+/* */
+/*---------------------------------------------------------------------*/
+/* */
+/* Copyright 1991 - 1993, Integrated Systems, Inc. */
+/* ALL RIGHTS RESERVED */
+/* */
+/* Permission is hereby granted to licensees of Integrated Systems, */
+/* Inc. products to use or abstract this computer program for the */
+/* sole purpose of implementing a product based on Integrated */
+/* Systems, Inc. products. No other rights to reproduce, use, */
+/* or disseminate this computer program, whether in part or in */
+/* whole, are granted. */
+/* */
+/* Integrated Systems, Inc. makes no representation or warranties */
+/* with respect to the performance of this computer program, and */
+/* specifically disclaims any responsibility for any damages, */
+/* special or consequential, connected with the use of this program. */
+/* */
+/***********************************************************************/
+#include "sys_conf.h"
+#include "bsp.h"
+#include <bspfuncs.h>
+#include <configs.h>
+
+struct ioparms;
+#define NULLF ((void (*)(struct ioparms *)) 0)
+UCHAR *SetUpDrivers(UCHAR *FreeMemPtr)
+{
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem serial device driver */
+/*---------------------------------------------------------------------*/
+#if (SC_DEV_SERIAL && BSP_SERIAL)
+ InstallDriver(SC_DEV_SERIAL, CnslInit, NULLF, NULLF,CnslRead,
+ CnslWrite, CnslCntrl, 0, 0);
+ FreeMemPtr = CnslSetup(FreeMemPtr, SD_DEF_BAUD, SC_APP_CONSOLE);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem tick timer */
+/*---------------------------------------------------------------------*/
+#if SC_DEV_TIMER
+ InstallDriver(SC_DEV_TIMER, RtcInit, NULLF, NULLF, NULLF, NULLF,
+ NULLF, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem ramdisk driver */
+/*---------------------------------------------------------------------*/
+#if SC_DEV_RAMDISK
+ InstallDriver(SC_DEV_RAMDISK, RdskInit, NULLF, NULLF, RdskRead,
+ RdskWrite, NULLF, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem TFTP driver */
+/*---------------------------------------------------------------------*/
+#if (SC_DEV_TFTP)
+ InstallDriver(SC_DEV_TFTP, TftpInit, TftpOpen, TftpClose, TftpRead,
+ NULLF, TftpCntl, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Add additional drivers to install here. */
+/*---------------------------------------------------------------------*/
+
+return(FreeMemPtr);
+}
+
diff --git a/tests/run_tests.psosim b/tests/run_tests.psosim
new file mode 100755
index 00000000000..3d18d0e7eb8
--- /dev/null
+++ b/tests/run_tests.psosim
@@ -0,0 +1,163 @@
+#!/bin/sh -f
+# This is the UNIX version of the one-button ACE tests.
+# Contributed by Michael Rueger <m_rueger@SYSCOMP.DE>
+
+IFS="|"
+tmp=/tmp
+
+run()
+{
+ echo running $1
+ /bin/rm -f core log/$1.log
+
+ ./$1
+ status=$?
+
+ if [ $status -ne 0 ]; then
+ echo \"$1\" FAILED with exit status $status!!!!
+ fi
+
+ if [ -f core ]; then
+ echo \"$1\" dumped core!!!!
+ fi
+
+ if [ -f log/$1.log ]; then
+ ./run_tests.check log/$1.log
+ else
+ echo "No log file (log/$1.log) is present"
+ fi
+}
+
+echo "Starting tests..."
+
+run Basic_Types_Test
+
+#Atomic_Op_Test: threads not supported on this platform
+#run Atomic_Op_Test # uses Atomic_Op
+
+#TSS_Test: threads are not supported on this platform
+#run TSS_Test # uses Task, Mutex, Guard
+
+run Time_Value_Test
+run SString_Test
+
+# SYS V IPC not supported
+#run Naming_Test # uses Naming_Context, WString
+
+run Handle_Set_Test # uses Handle_Set
+
+
+#Mem_Map_Test: mmap: Operation not applicable
+#run Mem_Map_Test # uses Mem_Map
+
+#SV_Shared_Memory_Test: SYSV IPC is not supported on this platform
+#run SV_Shared_Memory_Test # uses SV_Shared_Memory, fork
+
+#MM_Shared_Memory_Test: requires either fork or threads
+#run MM_Shared_Memory_Test
+
+run Sigset_Ops_Test # uses sigset*() functions
+
+run Timer_Queue_Test # uses Event_Handler, Timer_Queue
+
+run SOCK_Connector_Test # uses SOCK_Connector
+
+#Task_Test: threads not supported on this platform
+#run Task_Test # uses Thread_Manager, Task
+
+#Thread_Manager_Test: threads not supported on this platform
+#run Thread_Manager_Test # uses Thread_Manager, Task
+
+#Thread_Pool_Test: threads not supported on this platform
+#run Thread_Pool_Test # uses Thread_Manager, Task
+
+#Future_Test: threads not supported on this platform
+#run Future_Test # uses Thread_Manager, Task
+
+#Reactors_Test: threads not supported on this platform
+#run Reactors_Test # uses Task, Mutex, Reactor
+
+#Reactor_Exceptions_Test: not correctly implemented without threads
+#run Reactor_Exceptions_Test # uses Reactor and C++ exceptions
+
+#Reactor_Notify_Test: threads not supported on this platform
+#run Reactor_Notify_Test # uses Reactor's notify() method, Task
+
+run Reactor_Timer_Test # uses Event_Handler, Reactor
+
+#Reactor_Performance_Test: threads not supported on this platform
+#run Reactor_Performance_Test # uses Event_Handler, Reactor
+
+#Notify_Performance_Test: threads not supported on this platform
+#run Notify_Performance_Test # uses Event_Handler, Reactor
+
+#Reader_Writer_Test: threads not supported on this platform
+#run Reader_Writer_Test # uses Thread_Manager, Mutex
+
+run Priority_Reactor_Test # uses Priority_Reactor, Acceptor/Connector...
+run SOCK_Test # uses Thread_Manager, SOCK_SAP
+run MT_SOCK_Test # uses Thread_Manager, Acceptor/Connector
+
+# ifdef ACE_HAS_STREAM_PIPES
+#SPIPE_Test: SPIPE is not supported on this platform
+#run SPIPE_Test # uses SPIPE_Acceptor/Connector, Thread_Manager
+
+#UPIPE_SAP_Test: threads not supported on this platform
+#run UPIPE_SAP_Test # uses UPIPE, Thread, Thread_Manager
+
+#Barrier_Test: threads not supported on this platform
+#run Barrier_Test # uses Service_Config, Barrier
+
+#Buffer_Stream_Test: threads not supported on this platform
+#run Buffer_Stream_Test # uses Service_Config, Module (Stream,Task, Message_Queue)
+
+#Priority_Buffer_Test: threads not supported on this platform
+#run Priority_Buffer_Test # uses Service_Config, Message_Queue
+
+run Recursive_Mutex_Test # uses Service_Config, Recursive_Thread_Mutex
+
+#Time_Service_Test: uses fork
+#run Time_Service_Test # uses libnetsvcs
+
+#Tokens_Test: threads not supported on this platform
+#run Tokens_Test
+
+run Map_Manager_Test # uses Map Manager and Hash Map Manager + Forward and Reverse Map Iterators.
+
+#Message_Queue_Notifications_Test: threads not supported on this platform
+#run Message_Queue_Notifications_Test # uses Message_Queue + Reactor.
+
+run Message_Queue_Test # uses Message_Queue + Forward and Reverse Message Queue Iterators.
+run Simple_Message_Block_Test # uses Message_Block
+
+#Message_Block_Test: threads not supported on this platform
+#run Message_Block_Test # uses Message_Block and Message_Queue
+
+#Pipe_Test: uses fork
+#run Pipe_Test # uses Pipe
+
+#Process_Mutex_Test: uses fork
+#run Process_Mutex_Test # uses Process_Mutex
+
+#Thread_Mutex_Test: threads not supported on this platform
+#run Thread_Mutex_Test # uses Thread_Process_Mutex
+
+run Process_Strategy_Test # uses ACE_Strategy_Acceptor
+run Service_Config_Test # uses Service_Config
+
+#Priority_Task_Test: threads not supported on this platform
+#run Priority_Task_Test # uses Task with priorities
+
+run IOStream_Test # uses ACE_IOStream and ACE_SOCK_Stream
+run Enum_Interfaces_Test # uses ACE::get_ip_interfaces()
+
+#Conn_Test: requires either fork or threads
+#run Conn_Test # uses Thread_Manager, Acceptor/Connector, SOCK_SAP
+
+echo "Tests complete..."
+
+/bin/rm -f ace_pipe_name pattern $tmp/ace_temp_file $tmp/ace_temp_file2 $tmp/ace_test_file $tmp/Naming_Test*
+echo; echo
+ipcs
+
+# EOF