X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=test_urcu.c;h=17061f81a250d5f12f7e4836d7caf81835cd43d4;hp=10d4d9961292d3149d04fe88417a7247de3c8ad8;hb=f5f51ac3ef3e0db8a0940c456bce22bc9000fdbf;hpb=b257a10b0b05064dcb5dc9d4d1c5f95c0364b9dd diff --git a/test_urcu.c b/test_urcu.c index 10d4d99..17061f8 100644 --- a/test_urcu.c +++ b/test_urcu.c @@ -37,7 +37,7 @@ void *thr_reader(void *arg) struct test_array *local_ptr; printf("thread %s, thread id : %lu, pid %lu\n", - "reader", pthread_self(), getpid()); + "reader", pthread_self(), (unsigned long)getpid()); sleep(2); urcu_register_thread(); @@ -67,7 +67,7 @@ void *thr_writer(void *arg) struct test_array *new, *old; printf("thread %s, thread id : %lu, pid %lu\n", - "writer", pthread_self(), getpid()); + "writer", pthread_self(), (unsigned long)getpid()); sleep(2); for (i = 0; i < 100000; i++) { @@ -82,7 +82,7 @@ void *thr_writer(void *arg) new->a = 8; new->b = 12; new->c[55] = 2; - old = urcu_publish_content(&test_rcu_pointer, new); + old = urcu_publish_content((void **)&test_rcu_pointer, new); rcu_write_unlock(); /* can be done after unlock */ if (old) {