File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 249249\texttt {sched\_ yield } (this is POSIX function, unlike \texttt {pthread\_ yield }).
250250\item If the main thread does not wait for the thread to finish, the whole
251251program will terminate even though there are still some threads running,
252- see \example {pthreads/pthread\_ create .c}
252+ see \example {pthreads/pthread-create .c}
253253\item Be careful not to use this:
254254\begin {alltt }
255255for (i = 0; i < N; i++)
259259It looks like we pass each thread its index. However, before the started thread
260260gets scheduled to run, a next iteration might happen, modifying \texttt {i }.
261261\item \hlabel {WRONG_USE_OF_ARG} Examples: \example {pthreads/wrong-use-of-arg.c},
262- \example {pthreads/correct-use-of-arg .c}.
262+ \example {pthreads/correct-use-of-args .c}.
263263\item If you need to pass only one value, you could use the following
264264(\textbf {note that it is implementation specific in the C standard so it is not
265265portable });
You can’t perform that action at this time.
0 commit comments