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);
}
/*
static
unsigned long test_hash(void *_key, size_t length, unsigned long seed)
{
- unsigned long key = (unsigned long) _key;
+ unsigned int key = (unsigned int) _key;
- assert(length == sizeof(unsigned long));
+ assert(length == sizeof(unsigned int));
return hash_u32(&key, 1, seed);
}
#else
*/
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);
}
{
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)