Re: C issues with spinlocks and preemption

Ralf Baechle (ralf@uni-koblenz.de)
Fri, 21 Jul 2000 15:08:31 +0200


On Tue, Jul 18, 2000 at 02:36:41PM -0700, George Anzinger wrote:

> I think the problem is a bit bigger than this. This problem in a nut
> shell is that cc compiles the inline code when it sees it, not when it
> is referenced. This means inline functions should _NOT_ be in header
> files _PERIOD_. Of the two possible fixes, I vote for fixing cc, but I
> am not holding my breath.

The common solution is to make the function a macro in that case. Aside
of that I consider gcc's implementation right. The inline should be
considered nothing but a hint to the compiler.

Ralf

-
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/