summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/unix
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-15 21:50:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-15 21:50:28 +0000
commitc64e4ed48285a0c944905bc02de89c20038f428b (patch)
tree7804e08b98cb9e6b9ac4de5e010c6fb70f9a011b /c/src/exec/score/cpu/unix
parentchanges remerged after lost in disk crash -- recovered from snapshot, partial... (diff)
downloadrtems-c64e4ed48285a0c944905bc02de89c20038f428b.tar.bz2
updates from Tony Bennett for PA and UNIX ports
Diffstat (limited to 'c/src/exec/score/cpu/unix')
-rw-r--r--c/src/exec/score/cpu/unix/cpu.c42
-rw-r--r--c/src/exec/score/cpu/unix/cpu.h4
-rw-r--r--c/src/exec/score/cpu/unix/unixtypes.h16
3 files changed, 47 insertions, 15 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c
index c77276020b..de3e6a7118 100644
--- a/c/src/exec/score/cpu/unix/cpu.c
+++ b/c/src/exec/score/cpu/unix/cpu.c
@@ -87,7 +87,7 @@ void _CPU_ISR_From_CPU_Init()
*/
sigemptyset(&posix_empty_mask);
-
+
/*
* Block all the signals except SIGTRAP for the debugger
* and SIGABRT for fatal errors.
@@ -602,7 +602,6 @@ void _CPU_ISR_Handler(int vector)
extern unsigned32 _Thread_Dispatch_disable_level;
extern boolean _Context_Switch_necessary;
-
if (_ISR_Nest_level++ == 0) {
/* switch to interrupt stack */
}
@@ -635,19 +634,34 @@ void _CPU_ISR_Handler(int vector)
void _CPU_Stray_signal(int sig_num)
{
- char buffer[ 4 ];
-
- /*
- * We avoid using the stdio section of the library.
- * The following is generally safe.
+ char buffer[ 4 ];
+
+ /*
+ * print "stray" msg about ones which that might mean something
+ * Avoid using the stdio section of the library.
+ * The following is generally safe.
*/
-
- buffer[ 0 ] = (sig_num >> 4) + 0x30;
- buffer[ 1 ] = (sig_num & 0xf) + 0x30;
- buffer[ 2 ] = '\n';
-
- write( 2, "Stray signal 0x", 12 );
- write( 2, buffer, 3 );
+
+ switch (sig_num)
+ {
+ case SIGCLD:
+ break;
+
+ default:
+ {
+ /*
+ * We avoid using the stdio section of the library.
+ * The following is generally safe.
+ */
+
+ buffer[ 0 ] = (sig_num >> 4) + 0x30;
+ buffer[ 1 ] = (sig_num & 0xf) + 0x30;
+ buffer[ 2 ] = '\n';
+
+ write( 2, "Stray signal 0x", 12 );
+ write( 2, buffer, 3 );
+ }
+ }
/*
* If it was a "fatal" signal, then exit here
diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h
index e002a73f65..df582ab44b 100644
--- a/c/src/exec/score/cpu/unix/cpu.h
+++ b/c/src/exec/score/cpu/unix/cpu.h
@@ -278,7 +278,11 @@ extern "C" {
* in the executive to justify turning this on.
*/
+#ifdef __GNUC__
#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (32)))
+#else
+#define CPU_STRUCTURE_ALIGNMENT
+#endif
/*
* The following defines the number of bits actually used in the
diff --git a/c/src/exec/score/cpu/unix/unixtypes.h b/c/src/exec/score/cpu/unix/unixtypes.h
index f1dc442baa..45f5cf9366 100644
--- a/c/src/exec/score/cpu/unix/unixtypes.h
+++ b/c/src/exec/score/cpu/unix/unixtypes.h
@@ -24,20 +24,34 @@ extern "C" {
#endif
/*
+ * some C++ compilers (eg: HP's) don't do 'signed' or 'volatile'
+ */
+#if defined(__cplusplus) && !defined(__GNUC__)
+#define signed
+#define volatile
+#endif
+
+/*
* This section defines the basic types for this processor.
*/
typedef unsigned char unsigned8; /* unsigned 8-bit integer */
typedef unsigned short unsigned16; /* unsigned 16-bit integer */
typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
typedef unsigned16 Priority_Bit_map_control;
typedef signed char signed8; /* 8-bit signed integer */
typedef signed short signed16; /* 16-bit signed integer */
typedef signed int signed32; /* 32-bit signed integer */
+
+/*
+ * some C++ compilers (eg: HP's) don't do 'long long'
+ */
+#if defined(__GNUC__)
+typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
typedef signed long long signed64; /* 64 bit signed integer */
+#endif
typedef unsigned32 boolean; /* Boolean value */