summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/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/lib/libbsp/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/lib/libbsp/unix')
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c3
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/intr.c3
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/no-ctor.c16
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc10
5 files changed, 29 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c b/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
index c912447631..cb3afabf98 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
@@ -27,10 +27,11 @@
#include <bsp.h>
#include <shm.h>
+#include <sys/types.h> /* pid_t */
shm_config_table BSP_shm_cfgtbl;
-int semid;
+int semid;
void Shm_Cause_interrupt_unix(
rtems_unsigned32 node
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c b/c/src/lib/libbsp/unix/posix/shmsupp/intr.c
index 243af403d9..845cedd36f 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/intr.c
@@ -21,6 +21,7 @@
#include <bsp.h>
#include <shm.h>
+#include <sys/types.h> /* pid_t */
void Shm_Cause_interrupt_unix(
rtems_unsigned32 node
@@ -29,5 +30,5 @@ void Shm_Cause_interrupt_unix(
Shm_Interrupt_information *intr;
intr = &Shm_Interrupt_table[node];
- _CPU_SHM_Send_interrupt( (int) intr->address, (int) intr->value );
+ _CPU_SHM_Send_interrupt( (pid_t) intr->address, intr->value );
}
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c b/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
index 76a57d0a06..6ccd680842 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
@@ -20,8 +20,6 @@
#include <bsp.h>
#include <shm.h>
-extern int semid;
-
/*
* Shm_Initialize_lock
*
diff --git a/c/src/lib/libbsp/unix/posix/startup/no-ctor.c b/c/src/lib/libbsp/unix/posix/startup/no-ctor.c
new file mode 100644
index 0000000000..349ad2b1dd
--- /dev/null
+++ b/c/src/lib/libbsp/unix/posix/startup/no-ctor.c
@@ -0,0 +1,16 @@
+/*
+ * rtems, floss, libc are always compiled with GNU compilers
+ * application code may be compiled with some other C++ compiler
+ * that has a different global constructor technique.
+ *
+ * For the simple case, where the app has no global constructors or
+ * is compiled by g++, we provide this empty routine
+ * In order to get both g++ constructors (RTEMS::RTEMS, for example)
+ * and application constructors run, we provide this routine.
+ *
+ * $Id$
+ */
+
+void invoke_non_gnu_constructors(void)
+{
+}
diff --git a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
index 6fb132b469..0b4278eb19 100644
--- a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
+++ b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
@@ -1,5 +1,5 @@
-// @(#)rtems-ctor.cc 1.6 - 95/04/25
//
+// @(#)rtems-ctor.cc 1.6 - 95/04/25
//
/*
@@ -81,6 +81,8 @@ RTEMS::~RTEMS()
}
extern "C" {
+ extern void invoke_non_gnu_constructors(void);
+
int
main(int argc,
char **argv,
@@ -96,6 +98,12 @@ extern "C" {
rtems_progname = "RTEMS";
/*
+ * run any non-gnu constructors we may need
+ */
+
+ invoke_non_gnu_constructors();
+
+ /*
* Start multitasking
*/