Module Name: src
Committed By: thorpej
Date: Mon Oct 11 01:21:28 UTC 2021
Modified Files:
src/sys/sys: event.h
Log Message:
Add a clarifying comment about it being safe to modify knote::kn_flags
without synchronization in the filter attach routine. This is safe
because the knote has not yet been published, and is typically used to
force EV_CLEAR and/or EV_ONESHOT on that filter's knotes.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/event.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/event.h
diff -u src/sys/sys/event.h:1.46 src/sys/sys/event.h:1.47
--- src/sys/sys/event.h:1.46 Mon Oct 11 01:07:36 2021
+++ src/sys/sys/event.h Mon Oct 11 01:21:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: event.h,v 1.46 2021/10/11 01:07:36 thorpej Exp $ */
+/* $NetBSD: event.h,v 1.47 2021/10/11 01:21:28 thorpej Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <[email protected]>
@@ -267,6 +267,12 @@ struct knote {
"\7WILLDETACH"
+/*
+ * The only time knote::kn_flags can be modified without synchronization
+ * is during filter attach, because the knote has not yet been published.
+ * This is usually to set EV_CLEAR or EV_ONESHOT as mandatory flags for
+ * that filter.
+ */
#define kn_id kn_kevent.ident
#define kn_filter kn_kevent.filter
#define kn_flags kn_kevent.flags /* q */