Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What happened to the pragma unshared in Sun C?

happened pragma Sun unshared
0
Posted

What happened to the pragma unshared in Sun C?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123