Ignore:
File:
1 edited

Legend:

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

    r7850dda rb7fd2a0  
    5151} exited_t;
    5252
    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/*-------------------------------------------------------------------*/
     57static void wait_for_cb_exit(size_t secs, exited_t *p, errno_t *presult)
    6058{
    6159        size_t loops = 0;
     
    7169       
    7270        if (!p->exited) {
    73                 *presult = ECBLOST;
     71                *presult = ETIMEOUT;
    7472        }
    7573}
     
    115113                        bool joined = false;
    116114                        do {
    117                                 int ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0);
    118                                 joined = (ret != ESYNCH_TIMEOUT);
     115                                errno_t ret = thread_join_timeout(thread[i], 5 * 1000 * 1000, 0);
     116                                joined = (ret != ETIMEOUT);
    119117                               
    120                                 if (ret == ESYNCH_OK_BLOCKED) {
     118                                if (ret == EOK) {
    121119                                        TPRINTF("%zu threads remain\n", thread_cnt - i - 1);
    122120                                }
     
    367365
    368366
    369 static int seq_test_result = EOK;
     367static errno_t seq_test_result = EOK;
    370368
    371369static atomic_t cur_time = {1};
     
    536534        join_one();
    537535       
    538         int result = EOK;
     536        errno_t result = EOK;
    539537        wait_for_cb_exit(2 /* secs */, p, &result);
    540538       
     
    555553typedef struct preempt_struct {
    556554        exited_t e;
    557         int result;
     555        errno_t result;
    558556} preempt_t;
    559557
Note: See TracChangeset for help on using the changeset viewer.