Lines Matching defs:lock
9 * master process sets a lock on a file region (this is called "byte
11 * this region, such as read, write, set a new lock ... The expected
42 /* Which lock will be applied by the master process on test startup */
142 /* Special case for test 'lock file byte byte by byte'.
167 /* Ensure the lock is correctly set */
181 perror("lock test : can't open test file :");
496 struct flock lock;
527 /* Lock instruction. We need to send a different section to lock to each process */
528 unSerializeFLock(&lock);
529 start = lock.l_start;
531 lock.l_start = start + i;
532 serializeFLock(&lock);
620 P("Read lock :%d\n", state);
626 P("Write lock :%d\n", state);
632 /* Apply the wanted lock */
637 perror("Master: can't set lock\n");
658 /* The main idea is to lock all the bytes in a file. Each slave process locks one byte.
662 * - send the exact section to lock to each slave
673 /* Each slave process re-writes its own field to lock */
678 /* Start to send sections to lock to remote process (network clients) */
680 /* Set the correct byte to lock */
885 /* Wait for the exact section to lock. The whole file is sent by the master */