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.
This commit is contained in:
Joel Sherrill
2002-04-16 13:42:31 +00:00
parent 485e80fa03
commit f918e74b5b
4 changed files with 42 additions and 0 deletions

View File

@@ -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.

View File

@@ -138,6 +138,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
*/