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

AudioCommon: Remove usages of volatile variables. #2387

Merged
merged 4 commits into from May 14, 2015

Conversation

lioncash
Copy link
Member

Converts them over to using atomics.

This is only ever used in these two sound streams. Seems silly to have it as a class member. Converted it to an atomic as well.
@@ -39,7 +41,7 @@ class AlsaSound final : public SoundStream
// 0 = continue
// 1 = shutdown
// 2 = done shutting down.
volatile int thread_data;
std::atomic<int> thread_data;

This comment was marked as off-topic.

@lioncash
Copy link
Member Author

@comex: Addressed in the recent-most commit.

@@ -19,6 +20,7 @@ class AOSound final : public SoundStream
{
#if defined(HAVE_AO) && HAVE_AO
std::thread thread;
std::atomic<bool> m_run_thread;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

skidau added a commit that referenced this pull request May 14, 2015
AudioCommon: Remove usages of volatile variables.
@skidau skidau merged commit e35148f into dolphin-emu:master May 14, 2015
@lioncash lioncash deleted the atomic branch May 14, 2015 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants