[MDEV-7437] remove suport for "atomics" with rwlocks Created: 2015-01-12  Updated: 2015-11-29  Resolved: 2015-01-13

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.1.3

Type: Task Priority: Minor
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-8403 Build on AIX: my_atomic.h", line 121.... Closed

 Description   

Our atomic ops library supports compilation in the mode where "atomic operations" aren't really atomic, but are protected with "rwlocks" (actually, mutexes). It was supposed to be used on platforms where we don't have native support for atomic ops.

This mode complicates the code significantly. There's a lot of extra declarations, preprocessor macros and wrappers, etc everywhere. But in fact, this mode is almost never used — in a few cases where it was used, that happened by mistake, was caused by an error elsewhere. Furthermore, XtraDB now has (and had it for quite a while) the code that requires atomic ops and cannot be compiled with rwlocks. We build with XtraDB everywhere — meaning atomic ops are supported everywhere where we build.

A suggestion is to remove this "rwlock" mode and remove all that complications that it forced into the code.



 Comments   
Comment by Sergei Golubchik [ 2015-01-12 ]

svoj, what do you think about it?

Comment by Sergey Vojtovich [ 2015-01-12 ]

I like it. Just for the record:

Generated at Thu Feb 08 07:19:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.