aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-12-24 16:19:33 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-12-24 16:19:33 +0000
commitfea73412a0079f7298ff672b0518bbbb288bc295 (patch)
treede5142435ca3980f799dcf8eb259c880712d3e19 /sys/sys/proc.h
parent57462f8f818c19d1dbc95c5a8611d8b21c297a4b (diff)
downloadsrc-fea73412a0079f7298ff672b0518bbbb288bc295.tar.gz
src-fea73412a0079f7298ff672b0518bbbb288bc295.zip
sleep(9), sleepqueue(9): const'ify wchan pointers
_sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify the channel pointers provided in any way; they are merely used as intptrs into a dictionary structure to match waiters with wakers. Correctly annotate this such that _sleep() and wakeup() may be used on const pointers without invoking ugly patterns like __DECONST(). Plumb const through all of the underlying sleepqueue bits. No functional change. Reviewed by: rlibby Discussed with: kib, markj Differential Revision: https://reviews.freebsd.org/D22914
Notes
Notes: svn path=/head/; revision=356057
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 680f6ebc9399..69a998bf83a4 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -252,7 +252,7 @@ struct thread {
int td_pflags; /* (k) Private thread (TDP_*) flags. */
int td_dupfd; /* (k) Ret value from fdopen. XXX */
int td_sqqueue; /* (t) Sleepqueue queue blocked on. */
- void *td_wchan; /* (t) Sleep address. */
+ const void *td_wchan; /* (t) Sleep address. */
const char *td_wmesg; /* (t) Reason for sleep. */
volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */
u_char td_tsqueue; /* (t) Turnstile queue blocked on. */