On Fri, 03 Oct 2008, Maurilio Longo wrote: Hi Maurilio,
> You're using mutexes for critical sections, in OS/2 there is a > DosEnterCritSection() call which stops task switching until after a > DosExitCritSection() is called. This is only terminology problem. In OS2 API CRITICAL SECTION means peace of code executed when all other threads are suspended. We do not need such exclusive and restrict CPU access. For us critical section means peace of code which cannot be accessed by other threads when one enter into it. Using DosEnterCritSection() in OS2 is probably much more expensive then mutexes (though it will be funny if for critical section they use some tricks) and for sure it's will be killer for total application and OS performance in multi CPU machine. > The only fear is that OS/2 critical sections could not scale well on real > multi-cpus If it does what is described then for sure it will reduce overall performance. Anyhow if you have a while you can to use it in garbage.c and compare results. It's enough to make: #define HB_GC_LOCK DosEnterCritSec(); #define HB_GC_UNLOCK DosExitCritSec(); > It could be an interesting thing if you don't care wasting some time to > speedup OS/2 :) (you're nearly becoming an OS/2 user, after all :D) but I > won't be able to do more test before next monday morning. I've just committed it. It's enabled by default in OS2 builds. Please test when you will find some time. I'm very interested in results. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour