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

Function group1_entry

examples/utest/testcases/mm/test_synchronization.h:52–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static void group1_entry(void *param)
53{
54 const size_t id = (size_t)param;
55 size_t test_times = TEST_TIMES;
56 size_t alive = test_times / 10;
57 void *buf;
58
59 while (test_times--)
60 {
61 if (test_times % alive == 0)
62 uassert_true(1);
63
64 buf = map();
65
66 memset(buf, 'A' + id, BUF_SIZE);
67 /* if other core write to our cache, force the changes to be visible to us */
68 rt_hw_dmb();
69
70 if (memtest(buf, 'A' + id, BUF_SIZE))
71 uassert_true(0);
72
73 semaphore_signal(&sem1[id]);
74 semaphore_wait(&sem2[id]);
75 unmap(buf);
76 }
77
78 rt_sem_release(&done);
79 return;
80}
81
82static void group2_entry(void *param)
83{

Callers

nothing calls this directly

Calls 7

mapFunction · 0.85
memtestFunction · 0.85
semaphore_signalFunction · 0.85
semaphore_waitFunction · 0.85
unmapFunction · 0.85
rt_sem_releaseFunction · 0.85
rt_hw_dmbFunction · 0.50

Tested by

no test coverage detected