Walter, I'm not sure I'm understanding this, but I did a test with mtcomplexshare.prg and I see that nGlobalCounter is protected by a mutex lock/unlock sequence.
If I remove those mutex calls on OS/2 with GCC at the end the result shows big differences. --------8<---------------- Thread 1 - LocalCounter= 5449444 Thread 2 - LocalCounter= 5469999 Total 10919443 GlobalCounter= 6345520 Difference 4573923 (E:\repos2\xharbour\tests) -------->8---------------- See attachment. Maurilio. Walter Negro wrote: > 2008-06-28 15:25 UTC-0300 Walter Negro <anegro/at/overnet.com.ar> > * include\hbdefs.h > * include\hbvmpub.h > * include\thread.h > * source\rtl\hbxml.c > * source\vm\arrays.c > * source\vm\arrayshb.c > * source\vm\codebloc.c > * source\vm\fastitem.c > * source\vm\fm.c > * source\vm\garbage.c > * source\vm\hvm.c > * source\vm\itemapi.c > * source\vm\thread.c > * tests\mtcomplexshare.prg > * Added atomic or volatile increment and decrement of counters of > complex types and structures. > Now is safe to share complex data type in diferent threads if C > compiler or OS support > function or create ASM thread-safe to inc/dec. > NOTE: Atomic increment and decrement need counter memory aligned > and 32 bits of lenght. > > Walter Negro > > > ------------------------------------------------------------------------ > > > No virus found in this outgoing message. > Checked by AVG. > Version: 8.0.101 / Virus Database: 270.4.2/1523 - Release Date: 28/06/2008 > 07:00 a.m. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > xHarbour-developers mailing list > xHarbour-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xharbour-developers -- __________ | | | |__| Maurilio Longo |_|_|_|____| farmaconsult s.r.l.
mtcomplexshare.prg
Description: application/prg
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers