Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic atomic operation support #1920

Closed
quink-black opened this issue Apr 4, 2021 · 3 comments
Closed

Basic atomic operation support #1920

quink-black opened this issue Apr 4, 2021 · 3 comments
Labels
[core] Area: Changes in SRT library core Type: Enhancement Indicates new feature requests
Milestone

Comments

@quink-black
Copy link
Contributor

There are a lot of variables declared as volatile, but they don't be access via atomic_load/atomic_store. Looks like there is no basic atomic operation support. How to add the support when C++11 is unavailable?

  1. Use compiler extensions?
  2. Implement SrtAtomic by Mutex?
@quink-black quink-black added the Type: Bug Indicates an unexpected problem or unintended behavior label Apr 4, 2021
@quink-black quink-black changed the title Use real atomic operation Basic atomic operation support Apr 4, 2021
@maxsharabayko
Copy link
Collaborator

Good question. This is something we were thinking about as well (see #1813).
The best way would be to find some C++03 library for atomic, if there is any.

The fallback scenario is implementing SrtAtomic by Mutex. Likely this will provide some burden on the performance.

@maxsharabayko
Copy link
Collaborator

For further reference: PR #1863 suggests atomic support.

@maxsharabayko maxsharabayko added [core] Area: Changes in SRT library core Type: Enhancement Indicates new feature requests and removed Type: Bug Indicates an unexpected problem or unintended behavior labels Apr 19, 2021
@maxsharabayko maxsharabayko added this to the v1.4.4 milestone Apr 19, 2021
@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Aug 9, 2021

Closing as PR #1863 introducing support for atomic was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants