mariadb/storage/innobase/os
Sergey Vojtovich 5608a737ea MDEV-10813 - Clean-up InnoDB atomics, memory barriers and mutexes
No point to issue RELEASE memory barrier in os_thread_create_func(): thread
creation is full memory barrier.

No point to issue os_wmb in rw_lock_set_waiter_flag() and
rw_lock_reset_waiter_flag(): this is deadcode and it is unlikely operational
anyway. If atomic builtins are unavailable - memory barriers are most certainly
unavailable too.

RELEASE memory barrier is definitely abused in buf_pool_withdraw_blocks(): most
probably it was supposed to commit volatile variable update, which is not what
memory barriers actually do. To operate properly it needs corresponding ACQUIRE
barrier without an associated atomic operation anyway.

ACQUIRE memory barrier is definitely abused in log_write_up_to(): most probably
it was supposed to synchronize dirty read of log_sys->write_lsn. To operate
properly it needs corresponding RELEASE barrier without an associated atomic
operation anyway.

Removed a bunch of ACQUIRE memory barriers from InnoDB rwlocks. They're
meaningless without corresponding RELEASE memory barriers.

Valid usage example of memory barriers without an associated atomic operation:
http://en.cppreference.com/w/cpp/atomic/atomic_thread_fence
2016-10-17 18:35:49 +04:00
..
os0event.cc Merge InnoDB 5.7 from mysql-5.7.9. 2016-09-02 13:22:28 +03:00
os0file.cc MDEV-10813 - Clean-up InnoDB atomics, memory barriers and mutexes 2016-10-17 18:35:48 +04:00
os0proc.cc MDEV-10813 - Clean-up InnoDB atomics, memory barriers and mutexes 2016-10-17 18:35:48 +04:00
os0thread.cc MDEV-10813 - Clean-up InnoDB atomics, memory barriers and mutexes 2016-10-17 18:35:49 +04:00