Refactor filesystem & stl code

This commit is contained in:
EnderIce2
2024-05-18 07:42:01 +03:00
parent 77a291d08b
commit 6801475243
186 changed files with 15784 additions and 9746 deletions

View File

@ -94,6 +94,25 @@ public:
~spin_lock() = default;
};
class __sl_guard
{
private:
spin_lock &sl;
public:
__sl_guard(spin_lock &sl, const char *FunctionName) : sl(sl)
{
this->sl.lock(FunctionName);
}
~__sl_guard()
{
this->sl.unlock();
}
};
#define sl_guard(sl) __sl_guard CONCAT(sl_guard_, __COUNTER__)(sl, __FUNCTION__)
/** @brief Please use this macro to create a new smart lock. */
class SmartLockClass
{