mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-09 15:09:50 +03:00
Temp commit. Cloth
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
by korenkonder
|
||||
GitHub/GitLab: korenkonder
|
||||
*/
|
||||
|
||||
#include "lock.hpp"
|
||||
|
||||
inline void lock_init(lock* l) {
|
||||
l->init = InitializeCriticalSectionAndSpinCount(&l->cs, 0);
|
||||
}
|
||||
|
||||
inline bool lock_check_init(lock* l) {
|
||||
return l->init;
|
||||
}
|
||||
|
||||
inline void lock_free(lock* l) {
|
||||
if (l->init)
|
||||
DeleteCriticalSection(&l->cs);
|
||||
l->init = FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user