feat: add SMB networking support

This commit is contained in:
daniel committed 2026-11-22 08:43:18 +01:00
1 parent 6665750528
commit 2af2e90606
55 files changed
+7456 -158

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#pragma once
#include <atomic>
#include <sched.h>
namespace kcp {
class Mutex {
std::atomic_flag flag = ATOMIC_FLAG_INIT;
public:
void Acquire() { while (flag.test_and_set(std::memory_order_acquire)) sched_yield(); }
bool TryAcquire() { return !flag.test_and_set(std::memory_order_acquire); }
void Release() { flag.clear(std::memory_order_release); }
};
using Spinlock = Mutex;
}