What happened to the pragma unshared in Sun C?
I read about a pragma ‘unshared’ for the C-compiler in some Solaris-thread papers. The new C-3.01 don’t support the feature anymore I think. There is no hint in the Solaris 2.4 Multithread Programming Guide. But the new TSD is very slow. I tested a program with direct register allocation under gcc (asm “%g3”) instead of calling the thr_getspecific procedure and it was over three times faster. Can I do the same thing or something else with the Sun C-compiler to make the C-3.01 Code also faster? A: The “thread local storage” feature that was mentioned in early papers about MT on Solaris, and the pragma “unshared”, were never implemented. I know what you mean about the performance of TSD. It isn’t very fast. I think the key here is to try to structure your program so that you don’t rely too much on thread specific data, if that’s possible. The SPARC specification reserves those %g registers for internal use. In general, it’s dangerous to rely on using them in your code. However, SC3.0.1 d