projects
/
gapil.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Posix Semaphores
[gapil.git]
/
listati
/
LockFile.c
1
#include <sys/types.h>
2
#include <sys/stat.h>
3
#include <unistd.h> /* Unix standard functions */
4
/*
5
* Function LockFile:
6
*/
7
int LockFile(const char* path_name)
8
{
9
return open(path_name, O_EXCL|O_CREAT);
10
}
11
/*
12
* Function UnlockFile:
13
*/
14
int UnlockFile(const char* path_name)
15
{
16
return unlink(path_name);
17
}