| 80 | } |
| 81 | |
| 82 | static void group2_entry(void *param) |
| 83 | { |
| 84 | const size_t id = (size_t)param; |
| 85 | size_t test_times = TEST_TIMES; |
| 86 | size_t alive = test_times / 10; |
| 87 | void *buf; |
| 88 | |
| 89 | while (test_times--) |
| 90 | { |
| 91 | if (test_times % alive == 0) |
| 92 | uassert_true(1); |
| 93 | |
| 94 | semaphore_signal(&sem2[id]); |
| 95 | semaphore_wait(&sem1[id]); |
| 96 | buf = map(); |
| 97 | |
| 98 | memset(buf, 'a' + id, BUF_SIZE); |
| 99 | /* if other core write to our cache, force the changes to be visible to us */ |
| 100 | rt_hw_dmb(); |
| 101 | |
| 102 | if (memtest(buf, 'a' + id, BUF_SIZE)) |
| 103 | uassert_true(0); |
| 104 | |
| 105 | unmap(buf); |
| 106 | } |
| 107 | |
| 108 | rt_sem_release(&done); |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * @brief On a smp system, we create at least 4 threads |
nothing calls this directly
no test coverage detected