| 50 | } |
| 51 | |
| 52 | static 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 | |
| 82 | static void group2_entry(void *param) |
| 83 | { |
nothing calls this directly
no test coverage detected