diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-24 21:34:55 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-24 21:34:55 +0000 |
commit | bdd5e8adcb807dc15486862721778f65e78982a8 (patch) | |
tree | 1b51d1401e6f912a7c2d6fafe3e29fb22ea13855 /nuttx/sched | |
parent | 4ffc124e0a308664bdd11e7d5207b48d3d3c731b (diff) | |
download | px4-firmware-bdd5e8adcb807dc15486862721778f65e78982a8.tar.gz px4-firmware-bdd5e8adcb807dc15486862721778f65e78982a8.tar.bz2 px4-firmware-bdd5e8adcb807dc15486862721778f65e78982a8.zip |
Add a test to verify that FPU registers are properly saved and restored on context switches.
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4421 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/sched_waitpid.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/nuttx/sched/sched_waitpid.c b/nuttx/sched/sched_waitpid.c index a1af343e1..5eefba371 100644 --- a/nuttx/sched/sched_waitpid.c +++ b/nuttx/sched/sched_waitpid.c @@ -1,8 +1,8 @@ /***************************************************************************** * sched/sched_waitpid.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -188,18 +188,18 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) sched_lock(); if (!tcb) { - err = ECHILD; - goto errout_with_errno; - } + err = ECHILD; + goto errout_with_errno; + } /* None of the options are supported */ #ifdef CONFIG_DEBUG if (options != 0) { - err = ENOSYS; - goto errout_with_errno; - } + err = ENOSYS; + goto errout_with_errno; + } #endif /* "If more than one thread is suspended in waitpid() awaiting termination of @@ -210,26 +210,26 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (stat_loc != NULL && tcb->stat_loc == NULL) { - tcb->stat_loc = stat_loc; - mystat = true; - } + tcb->stat_loc = stat_loc; + mystat = true; + } /* Then wait for the task to exit */ ret = sem_wait(&tcb->exitsem); if (ret < 0) { - /* Unlock pre-emption and return the ERROR (sem_wait has already set - * the errno). Handle the awkward case of whether or not we need to - * nullify the stat_loc value. - */ - - if (mystat) - { - tcb->stat_loc = NULL; - } - goto errout; - } + /* Unlock pre-emption and return the ERROR (sem_wait has already set + * the errno). Handle the awkward case of whether or not we need to + * nullify the stat_loc value. + */ + + if (mystat) + { + tcb->stat_loc = NULL; + } + goto errout; + } /* On success, return the PID */ |