Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/synch/rcu1.c

    rb7fd2a0 r7850dda  
    5151} exited_t;
    5252
    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)
     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/*-------------------------------------------------------------------*/
     59static void wait_for_cb_exit(size_t secs, exited_t *p, int *presult)
    5860{
    5961        size_t loops = 0;
     
    6971       
    7072        if (!p->exited) {
    71                 *presult = ETIMEOUT;
     73                *presult = ECBLOST;
    7274        }
    7375}
     
    113115                        bool joined = false;
    114116                        do {
    115                                 errno_t ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0);
    116                                 joined = (ret != ETIMEOUT);
     117                                int ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0);
     118                                joined = (ret != ESYNCH_TIMEOUT);
    117119                               
    118                                 if (ret == EOK) {
     120                                if (ret == ESYNCH_OK_BLOCKED) {
    119121                                        TPRINTF("%zu threads remain\n", thread_cnt - i - 1);
    120122                                }
     
    365367
    366368
    367 static errno_t seq_test_result = EOK;
     369static int seq_test_result = EOK;
    368370
    369371static atomic_t cur_time = {1};
     
    534536        join_one();
    535537       
    536         errno_t result = EOK;
     538        int result = EOK;
    537539        wait_for_cb_exit(2 /* secs */, p, &result);
    538540       
     
    553555typedef struct preempt_struct {
    554556        exited_t e;
    555         errno_t result;
     557        int result;
    556558} preempt_t;
    557559
Note: See TracChangeset for help on using the changeset viewer.