From b7db4d072384a5321803b28742f50bc43c9e6836 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 27 Feb 2004 16:25:05 +0000 Subject: [PATCH] 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. --- sys/sys/proc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index c8b4e99213b0..251815f65d1e 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; \