summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-02-27 16:25:05 +0000
committerjhb <jhb@FreeBSD.org>2004-02-27 16:25:05 +0000
commitaa7d6a1b3f558aa033b64bfc9b4b70d9d55f4b92 (patch)
treecaeb8231f7ad667e8985b0c39f806ce0ae8a3456
parentb23d8371fafb415e16a28cbade8b801b36c33a81 (diff)
downloadFreeBSD-src-aa7d6a1b3f558aa033b64bfc9b4b70d9d55f4b92.zip
FreeBSD-src-aa7d6a1b3f558aa033b64bfc9b4b70d9d55f4b92.tar.gz
Fix a few style nits. do { } while(0) are only used for compound
statements and nowhere else in the kernel seems to use them for single statements. Also, all other users of do { } while(0) use multiple lines rather than cramming it all onto one line.
-rw-r--r--sys/sys/proc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index c8b4e99..251815f 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -411,9 +411,9 @@ struct thread {
#define TD_CLR_SUSPENDED(td) TD_CLR_INHIB((td), TDI_SUSPENDED)
#define TD_CLR_IWAIT(td) TD_CLR_INHIB((td), TDI_IWAIT)
-#define TD_SET_RUNNING(td) do {(td)->td_state = TDS_RUNNING; } while (0)
-#define TD_SET_RUNQ(td) do {(td)->td_state = TDS_RUNQ; } while (0)
-#define TD_SET_CAN_RUN(td) do {(td)->td_state = TDS_CAN_RUN; } while (0)
+#define TD_SET_RUNNING(td) (td)->td_state = TDS_RUNNING
+#define TD_SET_RUNQ(td) (td)->td_state = TDS_RUNQ
+#define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN
#define TD_SET_ON_SLEEPQ(td) do {(td)->td_flags |= TDF_ONSLEEPQ; } while (0)
#define TD_CLR_ON_SLEEPQ(td) do { \
(td)->td_flags &= ~TDF_ONSLEEPQ; \
OpenPOWER on IntegriCloud