summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-03 06:47:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-04 07:24:29 +0200
commit159b63701539f3e584668a4ace13c6109d3b364b (patch)
treeefdf5d32034e3ba9e67477f00f42393ce6cb3cc4
parentconfdefs.h: Fix message queue size estimate (diff)
downloadrtems-159b63701539f3e584668a4ace13c6109d3b364b.tar.bz2
bsp/mvme5500: Use thread local variable
Use thread local variable instead of task variable. Update #2494.
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
index bb3cbf604f..f8f124ee46 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
@@ -53,28 +53,19 @@
#include <bsp/pci.h>
#include <rtems/bspIo.h>
#include <rtems/score/percpu.h>
+#include <threads.h>
#include <bsp/bspException.h>
#define SRR1_TEA_EXC (1<<(31-13))
#define SRR1_MCP_EXC (1<<(31-12))
-static volatile BSP_ExceptionExtension BSP_exceptionExtension = 0;
-
-/*
- * We know task variables are deprecated and don't want a warning. The
- * use of task variables needs to be fixed in this file.
- */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+static thread_local volatile BSP_ExceptionExtension BSP_exceptionExtension = 0;
BSP_ExceptionExtension
BSP_exceptionHandlerInstall(BSP_ExceptionExtension e)
{
volatile BSP_ExceptionExtension test;
- if ( RTEMS_SUCCESSFUL != rtems_task_variable_get(RTEMS_SELF, (void*)&BSP_exceptionExtension, (void**)&test) ) {
- /* not yet added */
- rtems_task_variable_add(RTEMS_SELF, (void*)&BSP_exceptionExtension, 0);
- }
test = BSP_exceptionExtension;
BSP_exceptionExtension = e;
return test;
@@ -100,18 +91,8 @@ int quiet=0;
fmt="Aieeh, Exception %d in initialization code\n";
} else {
/* retrieve the notepad which possibly holds an extention pointer */
- if (RTEMS_SUCCESSFUL==rtems_task_ident(RTEMS_SELF,RTEMS_LOCAL,&id) &&
-// FIXME: Deprecated use of Notepads. #2503.
-#if 0
-/* Must not use a notepad due to unknown initial value (notepad memory is allocated from the
- * workspace)!
- */
- RTEMS_SUCCESSFUL==rtems_task_get_note(id, BSP_EXCEPTION_NOTEPAD, &note)
-#else
- RTEMS_SUCCESSFUL==rtems_task_variable_get(id, (void*)&BSP_exceptionExtension, (void**)&note)
-#endif
- ) {
- ext = (BSP_ExceptionExtension)note;
+ if (RTEMS_SUCCESSFUL==rtems_task_ident(RTEMS_SELF,RTEMS_LOCAL,&id)) {
+ ext = BSP_exceptionExtension;
if (ext)
quiet=ext->quiet;
if (!quiet) {