Browse Source
			
			
			MDEV-22456 after-merge fix: introduce Atomic_relaxed
			
				
		MDEV-22456 after-merge fix: introduce Atomic_relaxed
	
		
	
			
				In the merge 9e6e43551f
we made Atomic_counter a more generic wrapper of std::atomic
so that dict_index_t would support the implicit assignment operator.
It is better to revert the changes to Atomic_counter and
instead introduce Atomic_relaxed as a generic wrapper to std::atomic.
Unlike Atomic_counter, we will not define operator++, operator+=
or similar, because we want to make the operations more explicit
in the users of Atomic_wrapper, because unlike loads and stores,
atomic read-modify-write operations always incur some overhead.
			
			
				pull/1554/head
			
			
		
				 7 changed files with 61 additions and 35 deletions
			
			
		- 
					45include/my_atomic.h
- 
					13include/my_counter.h
- 
					11storage/innobase/dict/dict0dict.cc
- 
					6storage/innobase/include/dict0mem.h
- 
					6storage/innobase/include/sync0rw.h
- 
					11storage/innobase/include/sync0rw.ic
- 
					4storage/innobase/sync/sync0rw.cc
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue