summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-04-16 13:42:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-04-16 13:42:31 +0000
commitf918e74b5bbc11a71d1b9723ba89eedc3c2eb521 (patch)
treeb1c0772b4cd96c65ef663f1316bede5e0a6341a1 /c/src/exec
parent485e80fa0316b6f9dec52d2653ee9a92776cacc5 (diff)
downloadrtems-f918e74b5bbc11a71d1b9723ba89eedc3c2eb521.tar.bz2
2002-04-16 Chris Johns <ccj@acm.org>
* src/threadinitialize.c: Per PR181, clear the array of user extension pointers. This lets user extensions that have hooked the switch handler know if a task has been processed by the user extension before. If a user extension is created after a task is started it may not know it.
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/score/ChangeLog7
-rw-r--r--c/src/exec/score/src/threadinitialize.c14
2 files changed, 21 insertions, 0 deletions
diff --git a/c/src/exec/score/ChangeLog b/c/src/exec/score/ChangeLog
index ea3930ba09..605154be0e 100644
--- a/c/src/exec/score/ChangeLog
+++ b/c/src/exec/score/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-16 Chris Johns <ccj@acm.org>
+
+ * src/threadinitialize.c: Per PR181, clear the array of user extension
+ pointers. This lets user extensions that have hooked the switch handler
+ know if a task has been processed by the user extension before. If a
+ user extension is created after a task is started it may not know it.
+
2002-04-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/system.h: Add i386 to multilib-able targets.
diff --git a/c/src/exec/score/src/threadinitialize.c b/c/src/exec/score/src/threadinitialize.c
index 9617f24665..feb07836e3 100644
--- a/c/src/exec/score/src/threadinitialize.c
+++ b/c/src/exec/score/src/threadinitialize.c
@@ -139,6 +139,20 @@ boolean _Thread_Initialize(
the_thread->extensions = (void **) extensions_area;
/*
+ * Clear the extensions area so extension users can determine
+ * if they are linked to the thread. An extension user may
+ * create the extension long after tasks have been created
+ * so they cannot rely on the thread create user extension
+ * call.
+ */
+
+ if ( the_thread->extensions ) {
+ int i;
+ for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
+ the_thread->extensions[i] = NULL;
+ }
+
+ /*
* General initialization
*/