diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-12 19:45:42 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-12 19:45:42 +0000 |
commit | b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e (patch) | |
tree | d14038b83435f95a9dbfeb9508bcef9994e057f9 /c/src/lib/libc/newlibc.c | |
parent | Added... (diff) | |
download | rtems-b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e.tar.bz2 |
Initial attempt at building HP PA-RISC using Solaris hosted tools.
Changed back to Newlib for Solaris UNIX simulator.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libc/newlibc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/c/src/lib/libc/newlibc.c b/c/src/lib/libc/newlibc.c index e041668375..db959d6156 100644 --- a/c/src/lib/libc/newlibc.c +++ b/c/src/lib/libc/newlibc.c @@ -119,10 +119,19 @@ libc_switch_hook(rtems_tcb *current_task, /* XXX We can't use rtems_task_set_note() here since SYSI task has a * tid of 0, which is treated specially (optimized, actually) * by rtems_task_set_note + * + * NOTE: The above comment is no longer true and we need to use + * the extension data areas added about the same time. */ - impure_value = (rtems_unsigned32) _REENT; - MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value); + /* + * Don't touch the outgoing task if it has been deleted. + */ + + if ( !_States_Is_transient( current_task->current_state ) ) { + impure_value = (rtems_unsigned32) _REENT; + MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value); + } _REENT = (struct _reent *) MY_task_get_note(heir_task, LIBC_NOTEPAD); @@ -171,7 +180,8 @@ libc_delete_hook(rtems_tcb *current_task, ptr = (struct _reent *) MY_task_get_note(deleted_task, LIBC_NOTEPAD); } - if (ptr) + /* if (ptr) */ + if (ptr && ptr != &libc_global_reent) { _wrapup_reent(ptr); _reclaim_reent(ptr); |