Re: Why does this break under SMP?

Bill Hawes (
Tue, 09 Sep 1997 10:45:33 -0400

Olaf Titz wrote:
> > this happened just enough times to do something about it. How hard is it
> > to add an SMP/Uniprocessor flag to modules? [or is it already done ;)]
> What's needed is an SMP "flag" in <linux/version.h> in a form that can
> be picked up at compile time. Perhaps like
> #ifndef __SMP__
> #error "SMP kernel needs compilation with __SMP__"
> #endif
> on SMP machines?

The kernel and modules may have been compiled at different times.

How about defining an external symbol in the kernel, kernel_is_SMP or
kernel_is_UNI. Then have SMP modules refer to kernel_is_SMP, so you
would get an undefined reference if you attempted to load a
non-matching module.


> olaf