From 619928c415863c1928681099158dec7083664fec Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Sun, 10 Dec 2023 20:57:24 +0100 Subject: [PATCH] add link to new pthread_rwlock example --- threads.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/threads.tex b/threads.tex index d73f4bd..dfdfbfa 100644 --- a/threads.tex +++ b/threads.tex @@ -1212,6 +1212,7 @@ thread for writing (and no one for reading). \item Read-write locks are semantically similar to locking files using \texttt{fcntl} function. +\item See \example{pthreads/pthread-rwlock.c} for a classic use case. \item It is common that a given implementation prefers writer threads to reader threads. E.g. if a lock is owned by a writer while some other thread calls function \funnm{pthread\_rwlock\_rdlock} and there is at least one thread