summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_generic.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-07-24 00:29:22 +0000
committeralfred <alfred@FreeBSD.org>2002-07-24 00:29:22 +0000
commit85762a62d478155e87c32b0f6b5208622f08a449 (patch)
tree40a1796b8e6a6df8e2b5c76760c2fb79e863ca56 /sys/kern/sys_generic.c
parent330880812d23470d8e3d1d4d40fd2a3569bdfb39 (diff)
downloadFreeBSD-src-85762a62d478155e87c32b0f6b5208622f08a449.zip
FreeBSD-src-85762a62d478155e87c32b0f6b5208622f08a449.tar.gz
Attempt to clarify comment in selrecord.
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r--sys/kern/sys_generic.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index e4e40cf..165284c 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -1147,10 +1147,14 @@ selrecord(selector, sip)
mtx_lock(&sellock);
/*
- * If the thread is NULL then take ownership of selinfo
- * however if the thread is not NULL and the thread points to
- * someone else, then we have a collision, otherwise leave it alone
- * as we've owned it in a previous selrecord on this selinfo.
+ * If the selinfo's thread pointer is NULL then take ownership of it.
+ *
+ * If the thread pointer is not NULL and it points to another
+ * thread, then we have a collision.
+ *
+ * If the thread pointer is not NULL and points back to us then leave
+ * it alone as we've already added pointed it at us and added it to
+ * our list.
*/
if (sip->si_thread == NULL) {
sip->si_thread = selector;
OpenPOWER on IntegriCloud