1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11212 - Clean-up MariaDB atomic operations

Removed my_atomic_initialize(): it doesn't make sense anymore.
This commit is contained in:
Sergey Vojtovich
2016-11-02 15:27:12 +04:00
parent 1369e70b56
commit 8f9999b5fc
11 changed files with 4 additions and 102 deletions

View File

@ -182,15 +182,12 @@ pthread_handler_t test_lf_hash(void *arg)
void do_tests()
{
plan(7);
plan(6);
lf_alloc_init(&lf_allocator, sizeof(TLA), offsetof(TLA, not_used));
lf_hash_init(&lf_hash, sizeof(int), LF_HASH_UNIQUE, 0, sizeof(int), 0,
&my_charset_bin);
bad= my_atomic_initialize();
ok(!bad, "my_atomic_initialize() returned %d", bad);
with_my_thread_init= 1;
test_concurrently("lf_pinbox (with my_thread_init)", test_lf_pinbox, N= THREADS, CYCLES);
test_concurrently("lf_alloc (with my_thread_init)", test_lf_alloc, N= THREADS, CYCLES);

View File

@ -118,11 +118,7 @@ pthread_handler_t test_atomic_cas(void *arg)
void do_tests()
{
plan(6);
bad= my_atomic_initialize();
ok(!bad, "my_atomic_initialize() returned %d", bad);
plan(5);
b32= c32= 0;
test_concurrently("my_atomic_add32", test_atomic_add, THREADS, CYCLES);

View File

@ -186,14 +186,11 @@ void do_tests()
skip(1, "Big test skipped");
return;
}
plan(14);
plan(13);
compile_time_assert(THREADS >= 4);
DBUG_PRINT("wt", ("================= initialization ==================="));
bad= my_atomic_initialize();
ok(!bad, "my_atomic_initialize() returned %d", bad);
pthread_cond_init(&thread_sync, 0);
pthread_mutex_init(&lock, 0);
wt_init();