libroot/riscv64: Fix TODO about using std::atomic for TLS.

As the comment noted, the same is done on x86_64 already.
This commit is contained in:
Augustin Cavalier
2026-04-27 15:15:03 -04:00
parent 747a839b95
commit 3a9a7e2188
+6 -3
View File
@@ -1,8 +1,11 @@
/* /*
* Copyright 2019-2021, Haiku, Inc. All Rights Reserved. * Copyright 2019-2021, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#include <atomic>
#include <runtime_loader/runtime_loader.h> #include <runtime_loader/runtime_loader.h>
#include "support/TLS.h" #include "support/TLS.h"
@@ -16,8 +19,8 @@ struct tls_index {
extern "C" void* __tls_get_addr(struct tls_index* ti); extern "C" void* __tls_get_addr(struct tls_index* ti);
// TODO: use std::atomic<int> here like x86_64
static int32 gNextSlot = TLS_FIRST_FREE_SLOT; static std::atomic<int> gNextSlot(TLS_FIRST_FREE_SLOT);
static inline void** static inline void**