summaryrefslogtreecommitdiff
path: root/unittest/mysys/my_atomic-t.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-12-29 23:44:45 +0100
committerSergei Golubchik <serg@mariadb.org>2018-12-29 23:44:45 +0100
commitaeefd26ecb1089678e343c64998749e9f2e3a1e4 (patch)
treea96f5fdff65a6d0a05d195a74a32bbb4aa0a58c1 /unittest/mysys/my_atomic-t.c
parent50c9469be821e1942a8a9c5f37132e1855c40c86 (diff)
parent802ce9672ff630bbef08235e0e39bf599075f985 (diff)
downloadmariadb-git-aeefd26ecb1089678e343c64998749e9f2e3a1e4.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'unittest/mysys/my_atomic-t.c')
-rw-r--r--unittest/mysys/my_atomic-t.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c
index 0f21c33455e..3198da6836d 100644
--- a/unittest/mysys/my_atomic-t.c
+++ b/unittest/mysys/my_atomic-t.c
@@ -29,9 +29,6 @@ pthread_handler_t test_atomic_add(void *arg)
my_atomic_add32(&bad, x);
my_atomic_add32(&bad, -x);
}
- pthread_mutex_lock(&mutex);
- if (!--running_threads) pthread_cond_signal(&cond);
- pthread_mutex_unlock(&mutex);
return 0;
}
@@ -47,13 +44,6 @@ pthread_handler_t test_atomic_add64(void *arg)
my_atomic_add64(&a64, x);
my_atomic_add64(&a64, -x);
}
- pthread_mutex_lock(&mutex);
- if (!--running_threads)
- {
- bad= (a64 != 0);
- pthread_cond_signal(&cond);
- }
- pthread_mutex_unlock(&mutex);
return 0;
}
@@ -83,9 +73,6 @@ pthread_handler_t test_atomic_fas(void *arg)
my_atomic_add32(&bad, -x);
- pthread_mutex_lock(&mutex);
- if (!--running_threads) pthread_cond_signal(&cond);
- pthread_mutex_unlock(&mutex);
return 0;
}
@@ -109,9 +96,6 @@ pthread_handler_t test_atomic_cas(void *arg)
ok= my_atomic_cas32(&bad, &y, y-x);
} while (!ok) ;
}
- pthread_mutex_lock(&mutex);
- if (!--running_threads) pthread_cond_signal(&cond);
- pthread_mutex_unlock(&mutex);
return 0;
}
@@ -146,4 +130,5 @@ void do_tests()
}
a64=0;
test_concurrently("my_atomic_add64", test_atomic_add64, THREADS, CYCLES);
+ bad= (a64 != 0);
}