X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=listati%2FMutexLocking.c;h=cee82da65e5d6ed73cdecf57a23cab7bfaa7436d;hb=a7f21b58f4074dc2637dd8f3619d7d5867d28da6;hp=e1c2e0aef72e38c6ea3e89dca55931c00be8a971;hpb=d47f15496fa85c8ec22edcde608f2665ec5b95ae;p=gapil.git diff --git a/listati/MutexLocking.c b/listati/MutexLocking.c index e1c2e0a..cee82da 100644 --- a/listati/MutexLocking.c +++ b/listati/MutexLocking.c @@ -12,7 +12,6 @@ int FindMutex(const char *path_name) int LockMutex(int fd) { struct flock lock; /* file lock structure */ - /* set flock structure */ lock.l_type = F_WRLCK; /* set type: read or write */ lock.l_whence = SEEK_SET; /* start from the beginning of the file */ lock.l_start = 0; /* set the start of the locked region */ @@ -24,7 +23,6 @@ int LockMutex(int fd) int UnlockMutex(int fd) { struct flock lock; /* file lock structure */ - /* set flock structure */ lock.l_type = F_UNLCK; /* set type: unlock */ lock.l_whence = SEEK_SET; /* start from the beginning of the file */ lock.l_start = 0; /* set the start of the locked region */ @@ -42,7 +40,6 @@ int ReadMutex(int fd) { int res; struct flock lock; /* file lock structure */ - /* set flock structure */ lock.l_type = F_WRLCK; /* set type: unlock */ lock.l_whence = SEEK_SET; /* start from the beginning of the file */ lock.l_start = 0; /* set the start of the locked region */