MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / test_cpusmp

Function test_cpusmp

bsp/raspberry-pi/raspi3-32/applications/test_device.c:73–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71#endif
72
73void test_cpusmp(void)
74{
75 rt_kprintf("Hello Test SMP!\n");
76#ifdef RT_USING_SMP
77 int i;
78 char test_name[RT_NAME_MAX];
79 for (i = 0; i < _CPUS_NR; i++)
80 {
81 rt_sprintf(test_name, "smp%d", i);
82 rt_thread_init(&smp[i],
83 test_name,
84 smp_test_entry,
85 RT_NULL,
86 &rt_thread_stack[i][0],
87 sizeof(rt_thread_stack[i]),
88 RT_THREAD_PRIORITY_MAX - 2,
89 32);
90 rt_thread_control(&smp[i], RT_THREAD_CTRL_BIND_CPU, (void*)i);
91 /* startup */
92 rt_thread_startup(&smp[i]);
93 rt_thread_delay(RT_TICK_PER_SECOND);
94 }
95#endif
96}
97
98#ifdef BSP_USING_PIN
99#define TEST_PIN_OUT 33

Callers 1

test_deviceFunction · 0.85

Calls 6

rt_kprintfFunction · 0.85
rt_sprintfFunction · 0.85
rt_thread_initFunction · 0.85
rt_thread_controlFunction · 0.85
rt_thread_startupFunction · 0.85
rt_thread_delayFunction · 0.85

Tested by

no test coverage detected