Re: [patch] 2.3.8+ UP masq

Steve Dodd (dirk@loth.demon.co.uk)
Sun, 27 Jun 1999 14:29:44 +0100


On Sun, Jun 27, 1999 at 08:42:07AM -0400, Matthew Harrell wrote:

> : Wouldn't it be easier just to remove the #ifdef / #endif from around the lock
> : declaration in the first place? On UP, they won't take up an space and the
> : spin_lock() calls are optimized away. It would make the code a lot tidier.
>
> Oh, I don't deny that but it got recently introduced in 2.3.8 and I figured
> there had to be a reason for it. It was pretty late at night when I did this so
> never asked if there was a reasoning behind it - why were they suddenly put in?

I'm not sure that the #ifdef around the spinlock_t declaration hasn't been
there all along. What *did* change was that the UP declarations of spin_lock()
and friends were made to reference the (0-length) spinlock_t, so gcc / egcs
didn't warn about unused variables. As the masq stuff ifdef'd out the variable
but not the functions, it started wingeing. Ironically, the spinlock was
probably ifdef'd to get rid of the warnings in the first place.

Did that make sense? :)

-- 
Never count your chickens before they rip your lips off

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