diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-13 12:18:27 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-13 12:18:27 +0200 |
commit | 6177a3c6b5a05ac2c64978ccf3ca11de9793505b (patch) | |
tree | f0b0e06c2c7c4f97c0069a0822574dd449e27296 /src/lanes.cpp | |
parent | dddc28153796f9c8eb256eddb335c8643226fd0b (diff) | |
download | lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.tar.gz lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.tar.bz2 lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.zip |
A small step toward making clang happy
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index 8b693c3..7196b72 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -308,7 +308,11 @@ LUAG_FUNC(lane_new) | |||
308 | lane->status = Lane::Running; | 308 | lane->status = Lane::Running; |
309 | } | 309 | } |
310 | // unblock the thread so that it can terminate gracefully | 310 | // unblock the thread so that it can terminate gracefully |
311 | #ifndef __PROSPERO__ | ||
311 | lane->ready.count_down(); | 312 | lane->ready.count_down(); |
313 | #else // __PROSPERO__ | ||
314 | lane->ready.test_and_set(); | ||
315 | #endif // __PROSPERO__ | ||
312 | } | 316 | } |
313 | } | 317 | } |
314 | 318 | ||
@@ -366,7 +370,12 @@ LUAG_FUNC(lane_new) | |||
366 | void success() | 370 | void success() |
367 | { | 371 | { |
368 | prepareUserData(); | 372 | prepareUserData(); |
373 | // unblock the thread so that it can terminate gracefully | ||
374 | #ifndef __PROSPERO__ | ||
369 | lane->ready.count_down(); | 375 | lane->ready.count_down(); |
376 | #else // __PROSPERO__ | ||
377 | lane->ready.test_and_set(); | ||
378 | #endif // __PROSPERO__ | ||
370 | lane = nullptr; | 379 | lane = nullptr; |
371 | } | 380 | } |
372 | } _onExit{ L_, _lane}; | 381 | } _onExit{ L_, _lane}; |