summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog7
-rw-r--r--cpukit/itron/src/itrontime.c2
-rw-r--r--cpukit/score/include/rtems/score/tod.h9
-rw-r--r--cpukit/score/src/iterateoverthreads.c3
-rw-r--r--cpukit/score/src/threaddispatch.c3
5 files changed, 21 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 91078f9c4a..5b0b80c306 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,12 @@
2007-04-05 Joel Sherrill <joel@OARcorp.com>
+ * itron/src/itrontime.c: Fix typo.
+ * score/include/rtems/score/tod.h: Add TOD_TICKS_PER_SECOND macro.
+ * score/src/iterateoverthreads.c: Safely take NULL as argument.
+ * score/src/threaddispatch.c: Formatting.
+
+2007-04-05 Joel Sherrill <joel@OARcorp.com>
+
* posix/Makefile.am: Fix formatting.
2007-04-05 Joel Sherrill <joel@OARcorp.com>
diff --git a/cpukit/itron/src/itrontime.c b/cpukit/itron/src/itrontime.c
index 96d5275ff3..77be2dc313 100644
--- a/cpukit/itron/src/itrontime.c
+++ b/cpukit/itron/src/itrontime.c
@@ -37,7 +37,7 @@ ER set_tim(
/* XXX */ temp = 0;
if(temp > 0) {
_Thread_Disable_dispatch();
- _TOD_Set(&the_tod);
+ _TOD_Set(&time);
_Thread_Enable_dispatch();
return E_OK;
}
diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h
index a0c252e376..f98c2c49fd 100644
--- a/cpukit/score/include/rtems/score/tod.h
+++ b/cpukit/score/include/rtems/score/tod.h
@@ -31,7 +31,6 @@ extern "C" {
#endif
#include <rtems/score/object.h>
-#include <rtems/score/watchdog.h>
#include <time.h>
/** @defgroup ScoreTODConstants TOD Constants
@@ -108,6 +107,14 @@ extern "C" {
/**@}*/
+/** @brief Ticks per Second
+ *
+ * This macro calculates the number of ticks per second.
+ */
+
+#define TOD_TICKS_PER_SECOND \
+ (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick)
+
/** @brief RTEMS Epoch Year
*
* The following constant define the earliest year to which an
diff --git a/cpukit/score/src/iterateoverthreads.c b/cpukit/score/src/iterateoverthreads.c
index 3841a45dfd..398a1a1f59 100644
--- a/cpukit/score/src/iterateoverthreads.c
+++ b/cpukit/score/src/iterateoverthreads.c
@@ -29,6 +29,9 @@ void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
Thread_Control *the_thread;
Objects_Information *information;
+ if ( !routine )
+ return;
+
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 96f4fa6c3f..136433be17 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -114,7 +114,8 @@ void _Thread_Dispatch( void )
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
- if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
+ if ( (executing->fp_context != NULL) &&
+ !_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );