diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-27 16:31:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-27 16:31:02 -0600 |
commit | a32bc5d688125095b309e96e32245736d8f61781 (patch) | |
tree | bc865f6c4196a702eb877ee203e8e223562f1619 /nuttx/arch/sh/src | |
parent | dce98ad7cd0742cc258a2ed9200c6a76fbfb329f (diff) | |
download | nuttx-a32bc5d688125095b309e96e32245736d8f61781.tar.gz nuttx-a32bc5d688125095b309e96e32245736d8f61781.tar.bz2 nuttx-a32bc5d688125095b309e96e32245736d8f61781.zip |
Add ADDRENV support to ALL implmentations of _exit()
Diffstat (limited to 'nuttx/arch/sh/src')
-rw-r--r-- | nuttx/arch/sh/src/common/up_exit.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nuttx/arch/sh/src/common/up_exit.c b/nuttx/arch/sh/src/common/up_exit.c index bfe56dcb7..6fcd8dd80 100644 --- a/nuttx/arch/sh/src/common/up_exit.c +++ b/nuttx/arch/sh/src/common/up_exit.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_exit.c * - * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -50,6 +50,7 @@ #include "task/task.h" #include "sched/sched.h" +#include "group/group.h" #include "up_internal.h" /**************************************************************************** @@ -163,6 +164,16 @@ void _exit(int status) tcb = (struct tcb_s*)g_readytorun.head; +#ifdef CONFIG_ARCH_ADDRENV + /* Make sure that the address environment for the previously running + * task is closed down gracefully (data caches dump, MMU flushed) and + * set up the address environment for the new thread at the head of + * the ready-to-run list. + */ + + (void)group_addrenv(tcb); +#endif + /* Then switch contexts */ up_fullcontextrestore(tcb->xcp.regs); |