Re: [patch] SMP alternatives

From: Jeff Garzik
Date: Wed Nov 23 2005 - 20:02:15 EST

Linus Torvalds wrote:
The third alternative is to know at link-time that the process never does anything threaded, but that needs more developer attention and non-standard setups, and you _will_ get it wrong (some library will create some thread without the developer even realizing). It also has the duplicated library overhead (but at least now the duplication is just twice, not "each process duplicates its own private pointer")

Small data point: In a lot of gcc-related build processes, the configure/makefile junk passes '-pthread' to the compiler/linker.

So a lot of programs in Linux distros are already built this way. The bigger problem is with libraries, which cannot know ahead of time whether the app is threaded or not, and therefore must assume threaded.

A few libs do things like glibc, others (like GLib) have an explicit mylib_thread_init() called at program startup.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at