mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
C++11 patchset 3: remove Atomic/GenericAtomic and use std::atomic (#5906)
This commit is contained in:
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include "threading/atomic.h"
|
||||
#include <atomic>
|
||||
#include "threading/semaphore.h"
|
||||
#include "threading/thread.h"
|
||||
|
||||
@@ -137,7 +137,7 @@ void TestThreading::testThreadKill()
|
||||
|
||||
class AtomicTestThread : public Thread {
|
||||
public:
|
||||
AtomicTestThread(Atomic<u32> &v, Semaphore &trigger) :
|
||||
AtomicTestThread(std::atomic<u32> &v, Semaphore &trigger) :
|
||||
Thread("AtomicTest"),
|
||||
val(v),
|
||||
trigger(trigger)
|
||||
@@ -153,14 +153,14 @@ private:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Atomic<u32> &val;
|
||||
std::atomic<u32> &val;
|
||||
Semaphore &trigger;
|
||||
};
|
||||
|
||||
|
||||
void TestThreading::testAtomicSemaphoreThread()
|
||||
{
|
||||
Atomic<u32> val;
|
||||
std::atomic<u32> val;
|
||||
val = 0;
|
||||
Semaphore trigger;
|
||||
static const u8 num_threads = 4;
|
||||
|
Reference in New Issue
Block a user