[rtems commit] score: Move global variables definition

Sebastian Huber sebh at rtems.org
Tue Nov 13 08:35:36 UTC 2012


Module:    rtems
Branch:    master
Commit:    ecf98585043294323daad5dd5ac4b344a7c39856
Changeset: http://git.rtems.org/rtems/commit/?id=ecf98585043294323daad5dd5ac4b344a7c39856

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov  7 12:33:48 2012 +0100

score: Move global variables definition

Define _System_state_Current and _Internal_errors_What_happened in
interr.c to make _Internal_error_Occurred() more independent.

---

 cpukit/score/include/rtems/score/interr.h   |    2 +-
 cpukit/score/include/rtems/score/sysstate.h |    2 +-
 cpukit/score/src/interr.c                   |    4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 2a21fe0..0ba0750 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -93,7 +93,7 @@ typedef struct {
 /**
  *  When a fatal error occurs, the error information is stored here.
  */
-SCORE_EXTERN Internal_errors_Information _Internal_errors_What_happened;
+extern Internal_errors_Information _Internal_errors_What_happened;
 
 /**
  * @brief  Internal error Occurred
diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h
index c81e9c3..b847dc8 100644
--- a/cpukit/score/include/rtems/score/sysstate.h
+++ b/cpukit/score/include/rtems/score/sysstate.h
@@ -78,7 +78,7 @@ typedef enum {
 SCORE_EXTERN bool _System_state_Is_multiprocessing;
 #endif
 
-SCORE_EXTERN System_state_Codes _System_state_Current;
+extern System_state_Codes _System_state_Current;
 
 /*
  *  Make it possible for the application to get the system state information.
diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c
index 3679511..a9f1efc 100644
--- a/cpukit/score/src/interr.c
+++ b/cpukit/score/src/interr.c
@@ -18,6 +18,10 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/userext.h>
 
+System_state_Codes _System_state_Current;
+
+Internal_errors_Information _Internal_errors_What_happened;
+
 /*
  *  _Internal_error_Occurred
  *




More information about the vc mailing list