Re: 2.4.0-test9: minixfs causing oopsen when out of inodes

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sun Oct 08 2000 - 13:53:20 EST


On Sun, 8 Oct 2000, Daniel Phillips wrote:
> >
> > It's not worth changing at this point, but for future reference it would
> > probably be much preferable to return the error code instead of the
> > horrible "error value through pointer access" method, which is usually
> > rather inefficient too.
>
> It would be nice if we could return a struct consisting of the error and
> result. I'm not sure if this is allowed in C now or not. It didn't
> work when I tried it with gcc: it seems to consider a struct-valued
> function to be a void-valued. Odd.

Struct returns are used by the page table handling, and it works. There
it's used for other reasons (better encapsulation and type-checking).

However, it generates reasonably efficient code only for the single-value
struct case (the case for most of the page tables out there), and the
syntax ends up being absolutely horrible for multi-values. Not worth it.

                Linus

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



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:10 EST