Avoid alloc small memory pieces
[urcu.git] / tests / test_urcu_hash.c
index ffaec29f77e5fa2cde19b170c8fc58dc08d82477..70db8b3ca750f398f7314c9a6b794b3140d1bd20 100644 (file)
@@ -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,7 +888,7 @@ int main(int argc, char **argv)
         */
        rcu_register_thread();
        test_ht = cds_lfht_new(test_hash, test_compare, 0x42UL,
-                       init_hash_size,
+                       init_hash_size, 1,
                        opt_auto_resize ? CDS_LFHT_AUTO_RESIZE : 0, NULL);
        ret = populate_hash();
        assert(!ret);
@@ -943,7 +947,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)
This page took 0.02284 seconds and 4 git commands to generate.