X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_hash.c;h=9ae1fa0791cec5bbbf89e4513bd33a030977911d;hb=5afadd129c36f4778bcc12c8def6f4e3f9604c7b;hp=ffaec29f77e5fa2cde19b170c8fc58dc08d82477;hpb=f542a7ee9fcab5b6de55cb08d26176deb294b1a3;p=urcu.git diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index ffaec29..9ae1fa0 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -200,7 +200,11 @@ static void sigusr2_handler(int signo) { char msg[1] = { 0x42 }; - write(count_pipe[1], msg, 1); /* wakeup thread */ + ssize_t ret; + + do { + ret = write(count_pipe[1], msg, 1); /* wakeup thread */ + } while (ret == -1L && errno == EINTR); } /* @@ -884,8 +888,9 @@ int main(int argc, char **argv) */ rcu_register_thread(); test_ht = cds_lfht_new(test_hash, test_compare, 0x42UL, - init_hash_size, - opt_auto_resize ? CDS_LFHT_AUTO_RESIZE : 0, NULL); + init_hash_size, 1, + (opt_auto_resize ? CDS_LFHT_AUTO_RESIZE : 0) | + CDS_LFHT_ACCOUNTING, NULL); ret = populate_hash(); assert(!ret); @@ -943,7 +948,11 @@ int main(int argc, char **argv) } { char msg[1] = { 0x42 }; - write(count_pipe[1], msg, 1); /* wakeup thread */ + ssize_t ret; + + do { + ret = write(count_pipe[1], msg, 1); /* wakeup thread */ + } while (ret == -1L && errno == EINTR); } err = pthread_join(tid_count, &tret); if (err != 0)