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:
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <runtime_loader/runtime_loader.h>
|
||||
|
||||
#include "support/TLS.h"
|
||||
@@ -16,8 +19,8 @@ struct tls_index {
|
||||
|
||||
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**
|
||||
|
||||
Reference in New Issue
Block a user