summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-12 19:45:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-12 19:45:42 +0000
commitb3ac6a8dfe10aeaf3a9c59fd145bddfff119480e (patch)
treed14038b83435f95a9dbfeb9508bcef9994e057f9 /cpukit/libcsupport
parentAdded... (diff)
downloadrtems-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 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/src/newlibc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
index e041668375..db959d6156 100644
--- a/cpukit/libcsupport/src/newlibc.c
+++ b/cpukit/libcsupport/src/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);