File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ static int smp_call_func(void *arg)
41
41
return OK ;
42
42
}
43
43
44
+ static void wdg_wdentry (wdparm_t arg )
45
+ {
46
+ nxsched_smp_call ((1 << CONFIG_SMP_NCPUS ) - 1 , smp_call_func ,
47
+ (FAR void * )arg , false);
48
+ }
49
+
44
50
/****************************************************************************
45
51
* Public Functions
46
52
****************************************************************************/
@@ -53,6 +59,10 @@ void smp_call_test(void)
53
59
int cpu ;
54
60
int value ;
55
61
int status ;
62
+ struct wdog_s wdog =
63
+ {
64
+ 0
65
+ };
56
66
57
67
printf ("smp_call_test: Test start\n" );
58
68
@@ -102,6 +112,20 @@ void smp_call_test(void)
102
112
}
103
113
}
104
114
115
+ printf ("smp_call_test: Call in interrupt, wait\n" );
116
+
117
+ memset (& wdog , 0 , sizeof (wdog ));
118
+ wd_start (& wdog , 0 , wdg_wdentry , (wdparm_t )& sem );
119
+ for (cpu = 0 ; cpu < cpucnt ; cpu ++ )
120
+ {
121
+ status = sem_wait (& sem );
122
+ if (status != 0 )
123
+ {
124
+ printf ("smp_call_test: smp call in interrupt error\n" );
125
+ ASSERT (false);
126
+ }
127
+ }
128
+
105
129
printf ("smp_call_test: Call multi cpu, wait\n" );
106
130
107
131
nxsched_smp_call (cpuset , smp_call_func , & sem , true);
You can’t perform that action at this time.
0 commit comments