Skip to content
Discussion options

You must be logged in to vote

Hello,

I getting a linker error

undefined reference to __atomic_test_and_set'`

because of the code:

`loadFuture = std::async(std::launch::async, &Scene::load, this);

`

if there is no support for this, how could i work around this ?

thanks

Hi Hudson, in case you're still getting this linker error; so ps2sdk doesn’t support std::async or atomic operations at all—as they’re not part of the C++ stdlib for PS2. That’s why the linker can’t find __atomic_test_and_set.

I suggest you call Scene::load() directly during initialization before your main loop starts. PS2 doesn’t do threading well anyway—load your geometry upfront instead. That’s the standard approach and it’ll work great for what you…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HudsonSchumaker
Comment options

Answer selected by HudsonSchumaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants