[SERVER-40004] Change the signature of AtomicWord::compareAndSwap to mimic the implementation Created: 06/Mar/19  Updated: 29/Oct/23  Resolved: 07/Jun/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.2.1, 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Mira Carey Assignee: Shaileja Jain (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, sa-intern-tickets
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Service Arch 2019-06-03, Service Arch 2019-06-17
Participants:

 Description   

AtomicWord::compareAndSwap calls down to std::atomic::compare_exchange_strong. It would be a bit easier to use if its api reflected that (and returned a boolean, instead of compare_exchange_strong's expected out parameter).



 Comments   
Comment by Githook User [ 16/Aug/19 ]

Author:

{'name': 'Shelley Jain', 'email': 'shelleyjain@Shelleys-MacBook-Pro.local'}

Message: SERVER-40004 Modified compareAndSwap to return boolean

(cherry picked from commit c56c3d58260b734eb0a40dabf87ee4be4823b7ed)
Branch: v4.2
https://github.com/mongodb/mongo/commit/e1ece42a83357630e42dc73b4e35a842068d686b

Comment by Githook User [ 07/Jun/19 ]

Author:

{'name': 'Shelley Jain', 'email': 'shelleyjain@Shelleys-MacBook-Pro.local'}

Message: SERVER-40004 Modified compareAndSwap to return boolean
Branch: master
https://github.com/mongodb/mongo/commit/c56c3d58260b734eb0a40dabf87ee4be4823b7ed

Comment by Benjamin Caimano (Inactive) [ 30/May/19 ]

Queuing this up for when you have time

Generated at Thu Feb 08 04:53:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.