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

volatile qualify FlagEmuStop #46

Open
BGPierce opened this issue Dec 1, 2020 · 1 comment
Open

volatile qualify FlagEmuStop #46

BGPierce opened this issue Dec 1, 2020 · 1 comment

Comments

@BGPierce
Copy link
Contributor

BGPierce commented Dec 1, 2020

(from the old issues page)
jejones3141 commented on Apr 16, 2016
I believe that the declaration of FlagEmuStop should be changed to

static volatile unsigned char FlagEmuStop=TH_RUNNING;
because as it is, a compiler is free to change the loop

FlagEmuStop=TH_WAITING; //Signal Main thread we are waiting
while(FlagEmuStop==TH_WAITING)
Sleep(1);
in EmuLoop() to

FlagEmuStop = TH_WAITING;
for (;;)
Sleep(1);
since FlagEmuStop is static and its address is never passed outside Vcc.c.

I've been running Vcc on Linux using WINE, and I find that selecting exit doesn't close the Vcc window. I can't swear that this is the cause of the problem, but it could be. I don't use Windows (save under duress), and Visual Studio is in the "garbage" category at winehq, so I can't make the change locally and rebuild to test; sorry about that.

@BGPierce
Copy link
Contributor Author

BGPierce commented Dec 1, 2020

ursine commented on Apr 17, 2016
Thanks for the input. Things are at a bit of a lull at the moment, but one of us will take a look at it during the next burst of development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant