Changes in kernel/test/synch/rcu1.c [7850dda:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rcu1.c
r7850dda rb7fd2a0 51 51 } exited_t; 52 52 53 /* Callback raced with preexisting readers. */ 54 #define ERACE 123 55 /* Waited for too long for the callback to exit; consider it lost. */ 56 #define ECBLOST 432 57 58 /*-------------------------------------------------------------------*/ 59 static void wait_for_cb_exit(size_t secs, exited_t *p, int *presult) 53 /* Co-opt EPARTY error code for race detection. */ 54 #define ERACE EPARTY 55 56 /*-------------------------------------------------------------------*/ 57 static void wait_for_cb_exit(size_t secs, exited_t *p, errno_t *presult) 60 58 { 61 59 size_t loops = 0; … … 71 69 72 70 if (!p->exited) { 73 *presult = E CBLOST;71 *presult = ETIMEOUT; 74 72 } 75 73 } … … 115 113 bool joined = false; 116 114 do { 117 int ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0);118 joined = (ret != E SYNCH_TIMEOUT);115 errno_t ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0); 116 joined = (ret != ETIMEOUT); 119 117 120 if (ret == E SYNCH_OK_BLOCKED) {118 if (ret == EOK) { 121 119 TPRINTF("%zu threads remain\n", thread_cnt - i - 1); 122 120 } … … 367 365 368 366 369 static int seq_test_result = EOK;367 static errno_t seq_test_result = EOK; 370 368 371 369 static atomic_t cur_time = {1}; … … 536 534 join_one(); 537 535 538 int result = EOK;536 errno_t result = EOK; 539 537 wait_for_cb_exit(2 /* secs */, p, &result); 540 538 … … 555 553 typedef struct preempt_struct { 556 554 exited_t e; 557 int result;555 errno_t result; 558 556 } preempt_t; 559 557
Note:
See TracChangeset
for help on using the changeset viewer.