Re: C++ pushback



Denis Vlasenko wrote:
On Thursday 27 April 2006 17:27, Avi Kivity wrote:
Where do you see goto-heavy code in kernel?

[avi@cleopatra linux]$ grep -rw goto . | wc -l
37448

Repeat without 'wc' to get a detailed listing.

In 1999 Dave 'Barc0de' Jones, Paranoid wierdo noize making geek,
wrote this:

http://www.uwsg.iu.edu/hypermail/linux/kernel/9901.2/0939.html

I failed to find a link, but in 2004 Dave Jones, a well-known
kernel hacker, wrote something like "Wow, it's fun to read
my own old mail, how naive I was back then :)"

:)

I'll refer you to the 4-line vs 14-line examples. To the C++ trained mind, the 4 line segment is much clearer.

Feel free to get your hards dirty with kernel development,
and maybe you will say something similar a few years from now.

I have some experience with kernel code (mucking about the asynchronous I/O implementation) and a lot of experience in C++ system code (both ring 0 and userspace). What I've written in this thread is a result of 20+ (can't believe I'm writing that number) years of coding, not theoretical studies (I've studied aeronautical engineering but practiced it very little; if I talk about that maybe you can use the theory vs practice argument).

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [RFC: 2.6 patch] let GROUP_SCHED depend on BROKEN
    ... kernel developers. ... you've never before written a _single_ Linux kernel feature ... have no desire _at all_ to write true kernel code. ... the level of trivialities. ...
    (Linux-Kernel)
  • Re: [patch 4/4] KVM-trace port to tracepoints
    ... Tracepoints allow dormat instrumentation, like the kernel markers, but also ... This patch depends on the "Tracepoints" patch. ... Is it a specific property of KVM-trace that causes this LOC blow-up? ... strings into the kernel code, which, to some, looks like debugging code. ...
    (Linux-Kernel)
  • Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state changes
    ... If XCRYPT may be interrupted and the interrupt code again uses this optimized ... How could any kernel code use MMX/SSE/FPU when the interrupt case isn't ... Or is your argument that its lazy allocation itself is the problem: ... If this were right than any kernel code executing SSE may trigger now a oops ...
    (Linux-Kernel)
  • Dropping CONFIG_REORDER on x86-64 for 2.6.22
    ... The function enabled -ffunction-sections and then tries to reorder ... While that's in theory a worthy goal to save TLB/icache, in practice it ... we would find a good training workload. ... The workloads of the kernel are too diverse to make this concept ...
    (Linux-Kernel)
  • Re: When was /dev/cua* depreciated?
    ... so it has a kernel module in it. ... The installer shell script has no shebang at the top. ... so perhaps they no what needs to be done for the kernel code. ... to the serial/ethernet converter on the network, ...
    (uk.comp.os.linux)