- not initialized to 0 in 2 tests,
- within inner loop in 3rd test, thus always 0.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
static void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
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(),
printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
"dequeuer", (unsigned long) pthread_self(),
assert(test_pop || test_pop_all);
for (;;) {
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)
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;
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(),
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;
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(),
printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
"dequeuer", (unsigned long) pthread_self(),