feat(kcp, pfa): Add kcp::Spinlock class
This commit is contained in:
1 parent
bd8a1fdbca
commit
2b6c2fa827
7 files changed
+57
-5
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Spinlock.cpp
|
||||
* C++ Spinlock
|
||||
* Copyright (c) 2025 Daniel Hammer
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <atomic>
|
||||
|
||||
namespace kcp {
|
||||
class Spinlock {
|
||||
std::atomic_flag atomic_flag{ATOMIC_FLAG_INIT};
|
||||
public:
|
||||
void Aquire();
|
||||
void Release();
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user