summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c5
-rw-r--r--c/src/lib/libbsp/m68k/idp/clock/ckinit.c7
-rw-r--r--c/src/lib/libbsp/m68k/idp/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c7
-rw-r--r--c/src/lib/libbsp/m68k/idp/timer/timer.c7
-rw-r--r--c/src/lib/libbsp/shmdr/poll.c29
-rw-r--r--c/src/lib/libbsp/shmdr/shm.h4
-rw-r--r--c/src/lib/libbsp/shmdr/shm_driver.h4
-rw-r--r--c/src/lib/libc/__brk.c6
-rw-r--r--c/src/lib/libc/__gettod.c51
-rw-r--r--c/src/lib/libc/newlibc.c10
-rw-r--r--c/src/lib/libmisc/stackchk/check.c1
-rw-r--r--c/src/libchip/shmdr/poll.c29
-rw-r--r--c/src/libchip/shmdr/shm_driver.h4
-rw-r--r--c/src/libmisc/stackchk/check.c1
16 files changed, 109 insertions, 73 deletions
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
index 765e60c62c..115a5bd136 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
@@ -1,5 +1,5 @@
/*
- * @(#)bspstart.c 1.13 - 95/04/25
+ * @(#)bspstart.c 1.14 - 95/05/16
*
*/
@@ -24,7 +24,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * bspstart.c,v 1.2 1995/05/09 20:17:33 joel Exp
*/
#include <bsp.h>
@@ -255,11 +255,11 @@ bsp_start(void)
#ifdef hppa7200
/*
- * Use DR0 if supported
+ * Use HPPA_DR0 if supported
*/
{
int dr0;
- HPPA_ASM_MFCPU(DR0, dr0);
+ HPPA_ASM_MFCPU(HPPA_DR0, dr0);
cpu_number = (dr0 >> 4) & 0x7;
}
#else
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c b/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
index de62ec670d..69b458f099 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
@@ -18,9 +18,8 @@
*/
#include <rtems.h>
-#include "cpu.h"
-#include "bsp.h"
-#include "shm.h"
+#include <bsp.h>
+#include <shm.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
index abee1418cc..b27e9bbe38 100644
--- a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
@@ -26,10 +26,9 @@
#include <stdlib.h>
-#include "rtems.h"
-#include "clockdrv.h"
-#include "bsp.h"
-#include "cpu.h"
+#include <rtems.h>
+#include <clockdrv.h>
+#include <bsp.h>
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
volatile rtems_unsigned32 Clock_driver_ticks;
diff --git a/c/src/lib/libbsp/m68k/idp/include/bsp.h b/c/src/lib/libbsp/m68k/idp/include/bsp.h
index ec8221f1f9..826ab8cad2 100644
--- a/c/src/lib/libbsp/m68k/idp/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/idp/include/bsp.h
@@ -8,11 +8,10 @@
#ifndef __IDP_BSP_H
#define __IDP_BSP_H
-#include "rtems.h"
-#include "cpu.h"
-#include "console.h"
-#include "mc68230.h"
-#include "mc68681.h"
+#include <rtems.h>
+#include <console.h>
+#include <mc68230.h>
+#include <mc68681.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index 843a137485..80d619ebe8 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -20,10 +20,9 @@
* $Id$
*/
-#include "rtems.h"
-#include "bsp.h"
-#include "cpu.h"
-#include "libcsupport.h"
+#include <rtems.h>
+#include <bsp.h>
+#include <libcsupport.h>
unsigned char *duart_base;
extern struct duart_regs duart_info;
diff --git a/c/src/lib/libbsp/m68k/idp/timer/timer.c b/c/src/lib/libbsp/m68k/idp/timer/timer.c
index 176f393e45..6fa1ae206d 100644
--- a/c/src/lib/libbsp/m68k/idp/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/idp/timer/timer.c
@@ -27,10 +27,9 @@
*/
-#include "rtems.h"
-#include "cpu.h"
-#include "bsp.h"
-#include "mc68230.h"
+#include <rtems.h>
+#include <bsp.h>
+#include <mc68230.h>
#define TIMER_VECTOR 0x4D
diff --git a/c/src/lib/libbsp/shmdr/poll.c b/c/src/lib/libbsp/shmdr/poll.c
index 43f6711ff9..c833d49254 100644
--- a/c/src/lib/libbsp/shmdr/poll.c
+++ b/c/src/lib/libbsp/shmdr/poll.c
@@ -16,10 +16,11 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
*/
#include <rtems.h>
+#include <rtems/sysstate.h>
#include "shm.h"
#include "clockdrv.h"
@@ -29,12 +30,22 @@ void Shm_Poll()
Clock_isr( 0 ); /* invoke standard clock ISR */
- /* enable_tracing(); */
- /* ticks += 1; */
- Shm_Lock( Shm_Local_receive_queue );
- tmpfront = Shm_Local_receive_queue->front;
- Shm_Unlock( Shm_Local_receive_queue );
- if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
- rtems_multiprocessing_announce();
- Shm_Interrupt_count++;
+
+ /*
+ * Check for msgs only if we are "up"
+ * This avoids a race condition where we may get a clock
+ * interrupt before MPCI has completed its init
+ */
+
+ if (_System_state_Is_up(_System_state_Get()))
+ {
+ /* enable_tracing(); */
+ /* ticks += 1; */
+ Shm_Lock( Shm_Local_receive_queue );
+ tmpfront = Shm_Local_receive_queue->front;
+ Shm_Unlock( Shm_Local_receive_queue );
+ if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
+ rtems_multiprocessing_announce();
+ Shm_Interrupt_count++;
+ }
}
diff --git a/c/src/lib/libbsp/shmdr/shm.h b/c/src/lib/libbsp/shmdr/shm.h
index bee930138c..08ff6c3812 100644
--- a/c/src/lib/libbsp/shmdr/shm.h
+++ b/c/src/lib/libbsp/shmdr/shm.h
@@ -14,7 +14,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
*/
#ifndef __SHM_h
@@ -24,8 +24,6 @@
extern "C" {
#endif
-#include <cpu.h>
-
/* The information contained in the Node Status, Locked Queue, and
* Envelope Control Blocks must be maintained in a NEUTRAL format.
* Currently the neutral format may be selected as big or little
diff --git a/c/src/lib/libbsp/shmdr/shm_driver.h b/c/src/lib/libbsp/shmdr/shm_driver.h
index bee930138c..08ff6c3812 100644
--- a/c/src/lib/libbsp/shmdr/shm_driver.h
+++ b/c/src/lib/libbsp/shmdr/shm_driver.h
@@ -14,7 +14,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
*/
#ifndef __SHM_h
@@ -24,8 +24,6 @@
extern "C" {
#endif
-#include <cpu.h>
-
/* The information contained in the Node Status, Locked Queue, and
* Envelope Control Blocks must be maintained in a NEUTRAL format.
* Currently the neutral format may be selected as big or little
diff --git a/c/src/lib/libc/__brk.c b/c/src/lib/libc/__brk.c
index 6fb15342fe..7c43ffa32b 100644
--- a/c/src/lib/libc/__brk.c
+++ b/c/src/lib/libc/__brk.c
@@ -1,3 +1,5 @@
+#if !defined(RTEMS_UNIX)
+
/*
* RTEMS "Broken" __brk/__sbrk Implementation
*
@@ -12,7 +14,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * __brk.c,v 1.2 1995/05/09 20:24:28 joel Exp
*/
#include <rtems.h>
@@ -38,3 +40,5 @@ int __brk( const void *endds )
errno = EINVAL;
return -1;
}
+
+#endif
diff --git a/c/src/lib/libc/__gettod.c b/c/src/lib/libc/__gettod.c
index a1ab9776c8..6f8df8a65f 100644
--- a/c/src/lib/libc/__gettod.c
+++ b/c/src/lib/libc/__gettod.c
@@ -11,7 +11,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * __gettod.c,v 1.2 1995/05/09 20:24:31 joel Exp
*/
#include <rtems.h>
@@ -19,8 +19,10 @@
#ifdef RTEMS_NEWLIB
#include <sys/reent.h>
#endif
+
#include <time.h>
#include <sys/time.h>
+
#include <errno.h>
#include <assert.h>
@@ -29,14 +31,14 @@
*/
int gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
+ struct timeval *tp,
+ struct timezone *tzp
)
{
rtems_status_code status;
rtems_clock_time_value time;
- if ( !tp || !tzp ) {
+ if ( !tp ) {
errno = EFAULT;
return -1;
}
@@ -51,34 +53,51 @@ int gettimeofday(
tp->tv_sec = time.seconds;
tp->tv_usec = time.microseconds;
-#if 0
- tzp->minuteswest = timezone / 60; /* from seconds to minutes */
- tzp->dsttime = daylight;
-#endif
-
/*
* newlib does not have timezone and daylight savings time
* yet. When it does this needs to be fixed.
*/
- tzp->tz_minuteswest = 0; /* at UTC */
- tzp->tz_dsttime = 0; /* no daylight savings */
+ if ( tzp ) {
+ tzp->tz_minuteswest = 0; /* at UTC */
+ tzp->tz_dsttime = 0; /* no daylight savings */
+#if 0
+ tzp->minuteswest = timezone / 60; /* from seconds to minutes */
+ tzp->dsttime = daylight;
+#endif
+ }
return 0;
}
+#if defined(RTEMS_NEWLIB)
+
+#if 0
/*
- * "Reentrant" versions of the above routines implemented above.
+ * "Reentrant" version
*/
-#if 0
int _gettimeofday_r(
- struct _reent *ignored_reentrancy_stuff,
- struct timeval *tp,
- struct timezone *tzp
+ struct _reent *ignored_reentrancy_stuff,
+ struct timeval *tp,
+ struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
}
#endif
+/*
+ * "System call" version
+ */
+
+int _gettimeofday(
+ struct timeval *tp,
+ struct timezone *tzp
+)
+{
+ return gettimeofday( tp, tzp );
+}
+
+#endif /* defined(RTEMS_NEWLIB) */
+
#endif
diff --git a/c/src/lib/libc/newlibc.c b/c/src/lib/libc/newlibc.c
index 3c5e58b67c..39dea67775 100644
--- a/c/src/lib/libc/newlibc.c
+++ b/c/src/lib/libc/newlibc.c
@@ -1,16 +1,16 @@
/*
- * @(#)newlibc.c 1.8 - 95/04/25
+ * @(#)newlibc.c 1.9 - 95/05/16
*
*/
#if defined(RTEMS_NEWLIB)
/*
- * File: $RCSfile$
+ * File: newlibc.c,v
* Project: PixelFlow
* Created: 94/12/7
- * Revision: $Revision$
- * Last Mod: $Date$
+ * Revision: 1.2
+ * Last Mod: 1995/05/09 20:24:37
*
* COPYRIGHT (c) 1994 by Division Incorporated
*
@@ -35,7 +35,7 @@
*
* NOTE:
*
- * $Id$
+ * newlibc.c,v 1.2 1995/05/09 20:24:37 joel Exp
*
*/
diff --git a/c/src/lib/libmisc/stackchk/check.c b/c/src/lib/libmisc/stackchk/check.c
index 8b923f5c02..2d25f51f3e 100644
--- a/c/src/lib/libmisc/stackchk/check.c
+++ b/c/src/lib/libmisc/stackchk/check.c
@@ -329,6 +329,7 @@ void *Stack_check_find_high_water_mark(
* match pattern
*/
+ base += 4;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
diff --git a/c/src/libchip/shmdr/poll.c b/c/src/libchip/shmdr/poll.c
index 43f6711ff9..c833d49254 100644
--- a/c/src/libchip/shmdr/poll.c
+++ b/c/src/libchip/shmdr/poll.c
@@ -16,10 +16,11 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
*/
#include <rtems.h>
+#include <rtems/sysstate.h>
#include "shm.h"
#include "clockdrv.h"
@@ -29,12 +30,22 @@ void Shm_Poll()
Clock_isr( 0 ); /* invoke standard clock ISR */
- /* enable_tracing(); */
- /* ticks += 1; */
- Shm_Lock( Shm_Local_receive_queue );
- tmpfront = Shm_Local_receive_queue->front;
- Shm_Unlock( Shm_Local_receive_queue );
- if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
- rtems_multiprocessing_announce();
- Shm_Interrupt_count++;
+
+ /*
+ * Check for msgs only if we are "up"
+ * This avoids a race condition where we may get a clock
+ * interrupt before MPCI has completed its init
+ */
+
+ if (_System_state_Is_up(_System_state_Get()))
+ {
+ /* enable_tracing(); */
+ /* ticks += 1; */
+ Shm_Lock( Shm_Local_receive_queue );
+ tmpfront = Shm_Local_receive_queue->front;
+ Shm_Unlock( Shm_Local_receive_queue );
+ if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
+ rtems_multiprocessing_announce();
+ Shm_Interrupt_count++;
+ }
}
diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h
index bee930138c..08ff6c3812 100644
--- a/c/src/libchip/shmdr/shm_driver.h
+++ b/c/src/libchip/shmdr/shm_driver.h
@@ -14,7 +14,7 @@
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
- * $Id$
+ * shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
*/
#ifndef __SHM_h
@@ -24,8 +24,6 @@
extern "C" {
#endif
-#include <cpu.h>
-
/* The information contained in the Node Status, Locked Queue, and
* Envelope Control Blocks must be maintained in a NEUTRAL format.
* Currently the neutral format may be selected as big or little
diff --git a/c/src/libmisc/stackchk/check.c b/c/src/libmisc/stackchk/check.c
index 8b923f5c02..2d25f51f3e 100644
--- a/c/src/libmisc/stackchk/check.c
+++ b/c/src/libmisc/stackchk/check.c
@@ -329,6 +329,7 @@ void *Stack_check_find_high_water_mark(
* match pattern
*/
+ base += 4;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;