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

Compile Error :BasicTaskScheduler #54

Open
0011x opened this issue Nov 25, 2024 · 1 comment
Open

Compile Error :BasicTaskScheduler #54

0011x opened this issue Nov 25, 2024 · 1 comment

Comments

@0011x
Copy link

0011x commented Nov 25, 2024

BasicTaskScheduler.cpp:191:40: error: ‘struct std::atomic_flag’ has no member named ‘test’
if (fTriggersAwaitingHandling[i].test()) {
^~~~
Makefile:41: recipe for target 'BasicTaskScheduler.o' failed
make[1]: *** [BasicTaskScheduler.o] Error 1

May I ask how to solve the above problem?

@kamalmansata
Copy link

kamalmansata commented Dec 18, 2024

Yes I am also facing same issue. Below helped resolve the compilation issue.

diff --git a/BasicUsageEnvironment/BasicTaskScheduler.cpp b/BasicUsageEnvironment/BasicTaskScheduler.cpp
index 416317d..0c2e937 100644
--- a/BasicUsageEnvironment/BasicTaskScheduler.cpp
+++ b/BasicUsageEnvironment/BasicTaskScheduler.cpp
@@ -188,7 +188,7 @@ void BasicTaskScheduler::SingleStep(unsigned maxDelayTime) {
if (mask == 0) mask = EVENT_TRIGGER_ID_HIGH_BIT;
#ifndef NO_STD_LIB

  •  if (fTriggersAwaitingHandling[i].test()) {
    
  •  if (fTriggersAwaitingHandling[i].test_and_set()) {
      fTriggersAwaitingHandling[i].clear();
    

#else
if (fTriggersAwaitingHandling[i]) {

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

2 participants