Skip to content

Commit 6230187

Browse files
author
Vladimir Kotal
committed
wording
1 parent 619e169 commit 6230187

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

synchro.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
memory, i.e. several variables shared by processes.
243243
\item Dekker's solution is presented as a first solution to the problem of
244244
mutual exclusion of 2 processes, without having to apply the mechanism of
245-
strict alternation, i.e. if second process does not express will to enter
245+
strict alternation, i.e. if second process does not express the will to enter
246246
critical section, the first can enter how many times it wants
247247
(and ifdef([[[NOSPELLCHECK]]], [[[vice versa]]])).
248248
Dekker's solution is not trivial, compare it with 16 year younger
@@ -265,15 +265,15 @@
265265
Each process must check if the file exists and if yes, has to wait.
266266
\end{itemize}
267267
\begin{alltt}
268-
void \funnm{lock}(char *lockfile) \{
269-
while( (fd = open(lockfile,
270-
O\_RDWR|O\_CREAT|\emprg{O\_EXCL}, 0600)) == -1)
268+
void \funnm{lock}(char *lockfile) \{
269+
while( (fd = open(lockfile,
270+
O\_RDWR|O\_CREAT|\emprg{O\_EXCL}, 0600)) == -1)
271271
sleep(1); {\rm /* waiting in a loop for unlock */}
272-
close(fd);
273-
\}
272+
close(fd);
273+
\}
274274
275-
void \funnm{unlock}(char *lockfile) \{
276-
unlink(lockfile);
275+
void \funnm{unlock}(char *lockfile) \{
276+
unlink(lockfile);
277277
\}
278278
\end{alltt}
279279
\end{slide}

0 commit comments

Comments
 (0)