annotate packages/kernel/current/tests/fptest.c @ 2979:00ddfb443539

* tests/intr0.cxx (intr0_main): Fix a compiler warning by changing a CHECK() statement.
author sergeig
date Wed, 24 Nov 2010 18:40:20 +0000
parents 74dbf4c3f2e1
children 6724f8254bcb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
1 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
2 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
3 // fptest.cxx
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
4 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
5 // Basic FPU test
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
6 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
7 //==========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
8 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
9 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
10 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
11 // Copyright (C) 2003 Free Software Foundation, Inc.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
12 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
13 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
14 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
15 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
16 // version.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
17 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
18 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
21 // for more details.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
22 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
23 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
24 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
26 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
27 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
28 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
29 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
30 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
31 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
32 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
33 // General Public License v2.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
34 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
35 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
36 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
37 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2127
diff changeset
38 // ####ECOSGPLCOPYRIGHTEND####
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
39 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
40 //#####DESCRIPTIONBEGIN####
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
41 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
42 // Author(s): nickg@calivar.com
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
43 // Contributors: nickg@calivar.com
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
44 // Date: 2003-01-27
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
45 // Description: Simple FPU test. This is not very sophisticated as far
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
46 // as checking FPU performance or accuracy. It is more
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
47 // concerned with checking that several threads doing FP
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
48 // operations do not interfere with eachother's use of the
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
49 // FPU.
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
50 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
51 //####DESCRIPTIONEND####
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
52 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
53
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
54 #include <pkgconf/kernel.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
55 #include <pkgconf/hal.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
56
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
57 #include <cyg/hal/hal_arch.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
58
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
59 #include <cyg/kernel/kapi.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
60
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
61 #include <cyg/infra/testcase.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
62 #include <cyg/infra/diag.h>
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
63
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
64 //#include <cyg/kernel/test/stackmon.h>
2127
0e1e2bf4be93 * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
asl
parents: 1596
diff changeset
65 #include CYGHWR_MEMORY_LAYOUT_H
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
66
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
67 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
68
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
69 #if defined(CYGFUN_KERNEL_API_C) && \
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
70 defined(CYGSEM_KERNEL_SCHED_MLQUEUE) && \
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
71 (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
72
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
73 //==========================================================================
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
74 // Base priority for all threads.
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
75
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
76 #define BASE_PRI 5
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
77
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
78 //==========================================================================
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
79 // Runtime
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
80 //
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
81 // This is the number of ticks that the program will run for. 3000
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
82 // ticks is equal to 30 seconds in the default configuration. For
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
83 // simulators we reduce the run time to 3 simulated seconds.
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
84
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
85 #define RUN_TICKS 3000
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
86 #define RUN_TICKS_SIM 300
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
87
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
88 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
89 // Thread parameters
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
90
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
91 #define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_MINIMUM)
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
92
782
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
93 static cyg_uint8 stacks[3][STACK_SIZE];
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
94 static cyg_handle_t thread[3];
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
95 static cyg_thread thread_struct[3];
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
96
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
97 //==========================================================================
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
98 // Alarm parameters.
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
99
782
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
100 static cyg_alarm alarm_struct;
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
101 static cyg_handle_t alarm;
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
102
782
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
103 static cyg_count8 cur_thread = 0;
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
104 static cyg_count32 alarm_ticks = 0;
a9ff9f7e3010 * tests/fptest.c: Make all variables static to avoid any risk
jlarmour
parents: 760
diff changeset
105 static cyg_count32 run_ticks = RUN_TICKS;
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
106
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
107 //==========================================================================
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
108
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
109 static int errors = 0;
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
110
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
111 //==========================================================================
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
112 // Random number generator. Ripped out of the C library.
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
113
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
114 static int rand( unsigned int *seed )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
115 {
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
116 // This is the code supplied in Knuth Vol 2 section 3.6 p.185 bottom
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
117
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
118 #define RAND_MAX 0x7fffffff
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
119 #define MM 2147483647 // a Mersenne prime
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
120 #define AA 48271 // this does well in the spectral test
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
121 #define QQ 44488 // (long)(MM/AA)
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
122 #define RR 3399 // MM % AA; it is important that RR<QQ
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
123
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
124 *seed = AA*(*seed % QQ) - RR*(unsigned int)(*seed/QQ);
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
125 if (*seed < 0)
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
126 *seed += MM;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
127
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
128 return (int)( *seed & RAND_MAX );
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
129 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
130
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
131 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
132 // Test calculation.
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
133 //
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
134 // Generates an array of random FP values and then repeatedly applies
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
135 // a calculation to them and checks that the same result is reached
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
136 // each time. The calculation, in the macro CALC, is intended to make
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
137 // maximum use of the FPU registers. However, the i386 compiler
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
138 // doesn't let this expression get very complex before it starts
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
139 // spilling values out to memory.
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
140
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
141 static void do_test( double *values,
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
142 int count,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
143 int loops,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
144 int test,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
145 const char *name)
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
146 {
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
147 unsigned int i, j;
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
148 // volatiles necessary to force
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
149 // values to 64 bits for comparison
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
150 volatile double sum = 1.0;
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
151 volatile double last_sum;
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
152 unsigned int seed;
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
153
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
154 #define V(__i) (values[(__i)%count])
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
155 #define CALC ((V(i-1)*V(i+1))*(V(i-2)*V(i+2))*(V(i-3)*sum))
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
156
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
157 seed = ((unsigned int)&i)*count;
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
158
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
159 // Set up an array of values...
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
160 for( i = 0; i < count; i++ )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
161 values[i] = (double)rand( &seed )/(double)0x7fffffff;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
162
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
163 // Now calculate something from them...
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
164 for( i = 0; i < count; i++ )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
165 sum += CALC;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
166 last_sum = sum;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
167
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
168 // Now recalculate the sum in a loop and look for errors
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
169 for( j = 0; j < loops ; j++ )
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
170 {
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
171 sum = 1.0;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
172 for( i = 0; i < count; i++ )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
173 sum += CALC;
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
174
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
175 if( sum != last_sum )
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
176 {
1596
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
177 union double_int_union {
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
178 double d;
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
179 cyg_uint32 i[2];
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
180 } diu_sum, diu_lastsum;
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
181
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
182 diu_sum.d = sum;
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
183 diu_lastsum.d = last_sum;
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
184
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
185 errors++;
1596
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
186 if (sizeof(double) != 2*sizeof(cyg_uint32)) {
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
187 diag_printf("Warning: sizeof(double) != 2*sizeof(cyg_uint32), therefore next line may\n"
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
188 "have invalid sum/last_sum values\n");
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
189 }
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
190 diag_printf("%s: Sum mismatch! %d sum=[%08x:%08x] last_sum=[%08x:%08x]\n",
1596
df01feb2f050 * tests/fptest.c (do_test): Silence aliasing warning when breaking
jlarmour
parents: 1507
diff changeset
191 name,j, diu_sum.i[0], diu_sum.i[1], diu_lastsum.i[0], diu_lastsum.i[1] );
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
192 }
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
193
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
194 #if 0
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
195 if( ((j*count)%1000000) == 0 )
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
196 diag_printf("INFO:<%s: %2d calculations done>\n",name,j*count);
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
197 #endif
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
198 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
199
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
200 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
201
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
202 //==========================================================================
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
203 // Alarm handler
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
204 //
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
205 // This is called every tick. It lowers the priority of the currently
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
206 // running thread and raises the priority of the next. Thus we
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
207 // implement a form of timelslicing between the threads at one tick
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
208 // granularity.
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
209
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
210 static void alarm_fn(cyg_handle_t alarm, cyg_addrword_t data)
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
211 {
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
212 alarm_ticks++;
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
213
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
214 if( alarm_ticks >= run_ticks )
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
215 {
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
216 if( errors )
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
217 CYG_TEST_FAIL("Errors detected");
760
74589c7c236e * tests/fptest.c (alarm_fn): Added CYG_TEST_PASS() call to keep
nickg
parents: 648
diff changeset
218 else
74589c7c236e * tests/fptest.c (alarm_fn): Added CYG_TEST_PASS() call to keep
nickg
parents: 648
diff changeset
219 CYG_TEST_PASS("OK");
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
220
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
221 CYG_TEST_FINISH("FP Test done");
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
222 }
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
223 else
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
224 {
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
225 cyg_thread_set_priority( thread[cur_thread], BASE_PRI );
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
226
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
227 cur_thread = (cur_thread+1)%3;
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
228
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
229 cyg_thread_set_priority( thread[cur_thread], BASE_PRI-1 );
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
230 }
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
231 }
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
232
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
233
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
234 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
235
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
236 #define FP1_COUNT 1000
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
237
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
238 static double fpt1_values[FP1_COUNT];
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
239
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
240 void fptest1( CYG_ADDRWORD id )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
241 {
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
242 while(1)
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
243 do_test( fpt1_values, FP1_COUNT, 2000000000, id, "fptest1" );
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
244 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
245
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
246 //==========================================================================
2127
0e1e2bf4be93 * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
asl
parents: 1596
diff changeset
247 #if (CYGMEM_REGION_ram_SIZE / 8 / 2) < 10000
0e1e2bf4be93 * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
asl
parents: 1596
diff changeset
248 #define FP2_COUNT (CYGMEM_REGION_ram_SIZE / 8 / 2)
0e1e2bf4be93 * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
asl
parents: 1596
diff changeset
249 #else
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
250 #define FP2_COUNT 10000
2127
0e1e2bf4be93 * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
asl
parents: 1596
diff changeset
251 #endif
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
252
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
253 static double fpt2_values[FP2_COUNT];
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
254
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
255 void fptest2( CYG_ADDRWORD id )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
256 {
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
257 while(1)
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
258 do_test( fpt2_values, FP2_COUNT, 2000000000, id, "fptest2" );
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
259 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
260
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
261 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
262
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
263 #define FP3_COUNT 100
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
264
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
265 static double fpt3_values[FP3_COUNT];
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
266
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
267 void fptest3( CYG_ADDRWORD id )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
268 {
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
269 while(1)
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
270 do_test( fpt3_values, FP3_COUNT, 2000000000, id, "fptest3" );
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
271 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
272
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
273 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
274
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
275 void fptest_main( void )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
276 {
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
277
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
278 CYG_TEST_INIT();
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
279
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
280 if( cyg_test_is_simulator )
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
281 {
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
282 run_ticks = RUN_TICKS_SIM;
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
283 }
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
284
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
285 CYG_TEST_INFO("Run fptest in cyg_start");
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
286 do_test( fpt3_values, FP3_COUNT, 1000, 0, "start" );
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
287 CYG_TEST_INFO( "cyg_start run done");
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
288
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
289 cyg_thread_create( BASE_PRI-1,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
290 fptest1,
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
291 0,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
292 "fptest1",
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
293 &stacks[0][0],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
294 STACK_SIZE,
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
295 &thread[0],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
296 &thread_struct[0]);
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
297
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
298 cyg_thread_resume( thread[0] );
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
299
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
300 cyg_thread_create( BASE_PRI,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
301 fptest2,
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
302 1,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
303 "fptest2",
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
304 &stacks[1][0],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
305 STACK_SIZE,
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
306 &thread[1],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
307 &thread_struct[1]);
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
308
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
309 cyg_thread_resume( thread[1] );
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
310
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
311 cyg_thread_create( BASE_PRI,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
312 fptest3,
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
313 2,
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
314 "fptest3",
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
315 &stacks[2][0],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
316 STACK_SIZE,
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
317 &thread[2],
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
318 &thread_struct[2]);
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
319
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
320 cyg_thread_resume( thread[2] );
648
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
321
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
322 cyg_alarm_create( cyg_real_time_clock(),
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
323 alarm_fn,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
324 0,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
325 &alarm,
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
326 &alarm_struct );
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
327
0c5540a10fcc * tests/fptest.c: Changed to run for a constant time rather than a
nickg
parents: 552
diff changeset
328 cyg_alarm_initialize( alarm, cyg_current_time()+1, 1 );
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
329
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
330 cyg_scheduler_start();
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
331
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
332 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
333
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
334 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
335
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
336 #ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
337 externC void
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
338 cyg_hal_invoke_constructors();
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
339 #endif
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
340
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
341 externC void
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
342 cyg_start( void )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
343 {
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
344 #ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
345 cyg_hal_invoke_constructors();
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
346 #endif
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
347 fptest_main();
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
348 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
349
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
350 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
351
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
352 #else // CYGFUN_KERNEL_API_C...
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
353
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
354 externC void
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
355 cyg_start( void )
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
356 {
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
357 CYG_TEST_INIT();
1507
92cf4ff674de * tests/kmutex3.c (cyg_start): Use CYG_TEST_NA.
jlarmour
parents: 782
diff changeset
358 CYG_TEST_INFO("FP test requires:\n"
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
359 "CYGFUN_KERNEL_API_C && \n"
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
360 "CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
361 "(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
1507
92cf4ff674de * tests/kmutex3.c (cyg_start): Use CYG_TEST_NA.
jlarmour
parents: 782
diff changeset
362 CYG_TEST_NA("FP test requirements");
552
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
363 }
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
364
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
365 #endif // CYGFUN_KERNEL_API_C, etc.
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
366
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
367 //==========================================================================
fddb77989fbb * cdl/kernel.cdl:
nickg
parents:
diff changeset
368 // EOF fptest.cxx