-----------------------
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.
}
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",
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(),
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)
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(),
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(),
* 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);