Quotes of the week
[Posted November 25, 2008 by corbet]
+/*
+ * "Define 'is'", Bill Clinton
+ * "Define 'if'", Steven Rostedt
+ */
+#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
+ ({ \
+ int ______r; \
+ static struct ftrace_branch_data \
+ __attribute__((__aligned__(4))) \
+ __attribute__((section("_ftrace_branch"))) \
+ ______f = { \
+ .func = __func__, \
+ .file = __FILE__, \
+ .line = __LINE__, \
+ }; \
+ ______r = !!(cond); \
+ if (______r) \
+ ______f.hit++; \
+ else \
+ ______f.miss++; \
+ ______r; \
+ }))
--
Steven Rostedt debuts the new "if"
Working on lkml often sounds like everyone is screaming NO,
channeling nothing but stop energy. Sometimes people are, but more
often what they really mean is you just have to take your time and
do things right. Admittedly it is a lot of iteration, but Linux is
a noble pursuit.
--
Robert Love
But let's look at the problem which we're actually trying to solve.
Developer A wishes to write some kernel monitoring/controlling
code, so he is forced to stick it on his website, keep reminding
people to download updates, act as an independent target of other
people's patches, etc, etc. It's all a pain and horror, so
developer A gives up and implements his userspace code in the
kernel instead. It is, as a result, technically inferior and
English-only, but at least it got there.
--
Andrew Morton
(
Log in to post comments)