Skip to content

Commit a5bd713

Browse files
author
Vladimir Kotal
committed
reword
1 parent f18c0af commit a5bd713

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

threads.tex

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,16 +1328,15 @@
13281328
\label{BARRIER}
13291329

13301330
\begin{itemize}
1331-
\item The barrier API has been defined since SUSv3, see for example
1332-
\texttt{pthread\_\-barrier\_init}, however they can be created using
1333-
mutexes and condition variables.
1334-
\item The barrier API is non-mandatory part of POSIX (it belongs to
1335-
Advanced real-time threads extension) and hence SUS certified system does not
1336-
have to implement it, which is e.g. the case of macOS.
1337-
\item The barrier can be used e.g. in situation when it is necessary to perform
1338-
some initialization between individual phases of processing. The threads
1339-
need to wait for each other because the initialization can only begin
1340-
once the previous phase is over.
1331+
\item The barrier API has been defined since SUSv3,
1332+
The barrier API is non-mandatory part of POSIX (it belongs to
1333+
\emph{Advanced real-time threads extension}) and hence SUS certified system does
1334+
not have to implement it, which is e.g. the case of macOS.
1335+
However, a barrier can be implemented using mutexes and condition variables.
1336+
\item The barrier can be used e.g. in a situation when it is necessary to
1337+
perform some initialization between individual phases of processing.
1338+
The threads need to wait for each other because the initialization can only
1339+
begin once the previous phase is over.
13411340
Example \example{pthreads/pthread-barrier.c} shows the use in such case.
13421341
\item \texttt{pthread\_barrier\_wait} returns
13431342
the \texttt{PTHREAD\_BARRIER\_SERIAL\_THREAD} value

0 commit comments

Comments
 (0)