Thread (39 messages) 39 messages, 6 authors, 2015-04-13

Re: [rfc patch] rt,nohz_full: fix nohz_full for PREEMPT_RT_FULL

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2015-03-13 03:03:34
Also in: lkml

On Fri, 13 Mar 2015 03:13:15 +0100
Mike Galbraith [off-list ref] wrote:
quoted
quoted
+	int softirqd = IS_ENABLED(CONFIG_PREEMPT_RT_FULL);
+
+	softirqd &= current == this_cpu_ksoftirqd();
Ug, binary and logical ANDs should not be combined. Just looks nasty.
What about:

	softirqd = !!(IS_ENABLED(CONFIG_PREEMPT_RT_FULL) &&
			current == this_cpu_ksoftirqd());
My way looks prettier to me, but I seem to be the only who thinks so
(this is not the first time it got a gripe), so I'll change it ;-)
I shouldn't have said it looks nasty. It actually does look pretty, in
an artistic kind of way. It's just not very comprehensible.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help