23 #include <mix/Types.h>
37 #define EXCL_LOCK_TRIES 5
40 #define EXCL_LOCK_DELAY 1
43 #define EXCL_LOCK_DELAY_US 50000
52 #define PROCESS_LOCK_IPC_ID 168
56 #define PROCESS_LOCK_SEM_KEY 1
76 Logic LockCheck (LockId lid);
81 ErrCode LockResourceExclusive (LockId* plid,
const char* path);
84 ErrCode LockProcess (LockId* plid, ProcessLockReason reason);
87 ErrCode LockAtExit (LockId* plid, weAtExitHandlerProc proc);
90 ErrCode UnlockResourceById (LockId lid);
95 void UnlockAllResources ();
107 Logic CheckLockedResource (
const char* path);
110 ErrCode ListLockedResources (
const char* dirpath,
unsigned* n,
116 ErrCode ReleaseLockedResource (
const char* path);
123 ErrCode ReleaseAllLockedResources (
const char* dirpath,
unsigned* failed);