Re: arca-1-against-pre-2.1.127-3

Gerard Roudier (groudier@club-internet.fr)
Mon, 2 Nov 1998 00:20:46 +0100 (MET)


On Sun, 1 Nov 1998, Andrea Arcangeli wrote:

> On Sun, 1 Nov 1998, Gerard Roudier wrote:
>
> >On Sun, 1 Nov 1998, Andrea Arcangeli wrote:
> >
> >> - if( SCset->eh_timeout.expires == 0 )
> >> + if( SCset->eh_timeout.next == NULL )
> >
> >You seem to want to add some nice abstractions to timeout handling in
> >Linux, and this is a good point. But the above is bad spot in my opinion.
> >Better to fail than to write that.
> >I like italian spaghetti, but the kernel is not the right place for
> >preparing such an excellent dish, in my opinion. ;-)
>
> It seems that you don' t know how the timer code works. Study before
> complain. You have said _nothing_. If you don' t want to study send be a
> bug report.

Here is the bug report:

Even if not stated so, I think the 'next' field shall be considered as
part of timer implementation not available to applications. We may call
this a 'private' field. Accessing such a field outside timer
implementation is a severe bug with regards to code quality, in my
opinion. If we were in C++ you probably couldn't. Spaghetti code is the
result of programming this way. If an abstraction is missing, you should
suggest it to be added but not access directly implementation dependant
fields. If Linus disagrees, then I may consider I am wrong.

Regards,
Gerard.

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