From: Mathieu Desnoyers Date: Fri, 14 Jun 2013 21:31:17 +0000 (-0400) Subject: Merge branch 'master' into urcu/rcuja-range X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=02c3d91e578d156910027060ac720b1192e7ddc2;hp=e3481e91d0d7f536042e1c6e5e5e885037230e68;p=userspace-rcu.git Merge branch 'master' into urcu/rcuja-range Signed-off-by: Mathieu Desnoyers --- diff --git a/README b/README index ce498b9..c7403f8 100644 --- a/README +++ b/README @@ -27,9 +27,10 @@ ARCHITECTURES SUPPORTED ----------------------- Currently, Linux x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, -S390, S390x, ARM, Alpha, ia64 and Sparcv9 32/64 are supported. Tested on -Linux, FreeBSD 8.2/9.0, and Cygwin. Should also work on: Android, NetBSD 5, -OpenBSD, Darwin (more testing needed before claiming support for these OS). +S390, S390x, ARM, MIPS, Alpha, ia64 and Sparcv9 32/64 are supported. +Tested on Linux, FreeBSD 8.2/8.3/9.0/9.1/10.0 i386/amd64, and Cygwin. +Should also work on: Android, NetBSD 5, OpenBSD, Darwin (more testing +needed before claiming support for these OS). Linux ARM depends on running a Linux kernel 2.6.15 or better, GCC 4.4 or better. diff --git a/tests/api.h b/tests/api.h index 2b87656..dced0d8 100644 --- a/tests/api.h +++ b/tests/api.h @@ -151,9 +151,10 @@ static int __smp_thread_id(void) } spin_lock(&__thread_id_map_mutex); for (i = 0; i < NR_THREADS; i++) { - if (__thread_id_map[i] == tid) + if (__thread_id_map[i] == tid) { spin_unlock(&__thread_id_map_mutex); return i; + } } spin_unlock(&__thread_id_map_mutex); fprintf(stderr, "smp_thread_id: Rogue thread, id: %lu(%#lx)\n", diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 67ccaa2..9636f5b 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -274,6 +274,7 @@ void do_test_pop_all(enum test_sync sync) static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; + unsigned int counter = 0; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "dequeuer", (unsigned long) pthread_self(), @@ -291,8 +292,6 @@ static void *thr_dequeuer(void *_count) assert(test_pop || test_pop_all); for (;;) { - unsigned int counter = 0; - if (test_pop && test_pop_all) { /* both pop and pop all */ if (counter & 1) diff --git a/tests/test_urcu_wfcq.c b/tests/test_urcu_wfcq.c index cb1cc23..a3bd7e5 100644 --- a/tests/test_urcu_wfcq.c +++ b/tests/test_urcu_wfcq.c @@ -285,7 +285,7 @@ static void do_test_splice(enum test_sync sync) static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; - unsigned int counter; + unsigned int counter = 0; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "dequeuer", (unsigned long) pthread_self(), diff --git a/tests/test_urcu_wfs.c b/tests/test_urcu_wfs.c index a379fa3..043d842 100644 --- a/tests/test_urcu_wfs.c +++ b/tests/test_urcu_wfs.c @@ -270,7 +270,7 @@ static void do_test_pop_all(enum test_sync sync) static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; - unsigned int counter; + unsigned int counter = 0; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "dequeuer", (unsigned long) pthread_self(), diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 9c38212..4c400ce 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -177,7 +177,8 @@ struct cds_lfht *cds_lfht_new(unsigned long init_size, * Return 0 on success, negative error value on error. * Threads calling this API need to be registered RCU read-side threads. * cds_lfht_destroy should *not* be called from a RCU read-side critical - * section. + * section. It should *not* be called from a call_rcu thread context + * neither. */ extern int cds_lfht_destroy(struct cds_lfht *ht, pthread_attr_t **attr);