summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/sys/lock.h
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-05-04 22:29:09 +0000
committerdeischen <deischen@FreeBSD.org>2003-05-04 22:29:09 +0000
commit3cb9ba9e43902d7a4cf096e0b6cd3f12eda1b92c (patch)
treef349be58e219d80c1d742a23da9f54ca59e6b6c9 /lib/libpthread/sys/lock.h
parent9328ad6bf8f2652faa7b7568504c1abe7e4b513a (diff)
downloadFreeBSD-src-3cb9ba9e43902d7a4cf096e0b6cd3f12eda1b92c.zip
FreeBSD-src-3cb9ba9e43902d7a4cf096e0b6cd3f12eda1b92c.tar.gz
Protect against a race between granting a lock and accessing
other parts of the lock. Submitted by: davidxu
Diffstat (limited to 'lib/libpthread/sys/lock.h')
-rw-r--r--lib/libpthread/sys/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libpthread/sys/lock.h b/lib/libpthread/sys/lock.h
index 449ad36..e397111 100644
--- a/lib/libpthread/sys/lock.h
+++ b/lib/libpthread/sys/lock.h
@@ -55,6 +55,7 @@ struct lockreq {
struct lockuser *lr_watcher; /* only used for priority locks */
struct lockuser *lr_owner; /* only used for priority locks */
long lr_waiting; /* non-zero when wakeup needed */
+ volatile long lr_handshake; /* non-zero when wakeup in progress */
};
struct lockuser {
OpenPOWER on IntegriCloud