X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=listati%2FMutexLocking.c;h=cee82da65e5d6ed73cdecf57a23cab7bfaa7436d;hp=e1c2e0aef72e38c6ea3e89dca55931c00be8a971;hb=4d46f47e3a0e08440812b334f79489d92814e6d2;hpb=7208522fd60468969d96dba5d8dd2cbd24b75b89 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 */