-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_LockFileCreate
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Create an MTY_LockFile
for signaling resource ownership across processes.
The process that holds the lock will continue to hold the lock unil MTY_LockFileDestroy
is called or the process terminates. The lock file will be created if it does not exist.
MTY_LockFile *MTY_LockFileCreate(
const char * path,
MTY_FileMode mode
);
path
(const char *
)
Path to the lock file.
mode
(MTY_FileMode
)
Choose between exclusive or shared read access.
MTY_LockFile *
On failure, NULL
is returned. Call MTY_GetLog
for details.
The returned MTY_LockFile
must be destroyed with MTY_LockFileDestroy
.