summaryrefslogtreecommitdiff
path: root/apps/examples/ostest/main.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-24 21:34:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-24 21:34:55 +0000
commitcd7ab15d6faca00ad56a3cc55613a1529790aa1c (patch)
tree1b51d1401e6f912a7c2d6fafe3e29fb22ea13855 /apps/examples/ostest/main.c
parent1b4c92672cfd43d05dbee2db143af08ec84d90af (diff)
downloadnuttx-cd7ab15d6faca00ad56a3cc55613a1529790aa1c.tar.gz
nuttx-cd7ab15d6faca00ad56a3cc55613a1529790aa1c.tar.bz2
nuttx-cd7ab15d6faca00ad56a3cc55613a1529790aa1c.zip
Add a test to verify that FPU registers are properly saved and restored on context switches.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4421 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/ostest/main.c')
-rw-r--r--apps/examples/ostest/main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/examples/ostest/main.c b/apps/examples/ostest/main.c
index 327ec60e1..f48bca377 100644
--- a/apps/examples/ostest/main.c
+++ b/apps/examples/ostest/main.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * examples/ostest/main.c
+ * apps/examples/ostest/main.c
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 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
@@ -293,6 +293,14 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
+#ifdef CONFIG_ARCH_FPU
+ /* Check that the FPU is properly supported during context switching */
+
+ printf("\nuser_main: FPU test\n");
+ fpu_test();
+ check_test_memory_usage();
+#endif
+
#ifndef CONFIG_DISABLE_PTHREAD
/* Verify pthreads and pthread mutex */