On Tue, 30 Sep 2008, Mindaugas Kavaliauskas wrote: Hi Mindaugas,
>>> Perhaps we should use HB_THREAD_STUB or pass pStack parameter to functions. >> I've just implement it for estack.c and hvm.c. >> If possible please make tests so we can compare how it effects BCC builds. > Sorry for long delay, I was out of office a little, and I'm not sure for > presence in nearest time. Absolutely NP. > I've tried to test it using -DHB_STACK_PRELOAD. Because I see > #if defined( HB_STACK_PRELOAD ) && !defined( HB_USE_TLS ) > in hbstack.h and because of HB_STACK_PRELOAD is internal macro which can be set only inside files which were updated to use it (now hvm.c and estack.c) and it's set automatically. >> 2008-09-26 19:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) >> * harbour/include/hbstack.h >> * harbour/source/vm/estack.c >> + added assembler inline macros for TLS access in BCC and MinGW32 >> They are enabled when Harbour is compiled with -DHB_NO_TLS. > I've used -DHB_NO_TLS also. It was enough but now you do not have to use -DHB_NO_TLS because it's default for current BCC builds. > But compilation with C_USR=-DHB_STACK_PRELOAD -DHB_NO_TLS finishes on > errors: > Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland > source\vm\arrays.c: > Error E2451 source\vm\arrays.c 106: Undefined symbol '_hb_stack_ptr_' in > function hb_arrayPushBase It's expected due to -DHB_STACK_PRELOAD > I'm a little confused in all these settings: only hbthread.h checks for > HB_NO_TLS, hbstack.h ignores this setting. Correct order of include files > is important?! So, I've not tried to correct this problem. No, it's not important. All problems were caused by -DHB_STACK_PRELOAD > The only reason I see for binding stack preload with "no tls" is that stack > preload also uses inlined Windows like function to access tls. But I see it > as to separate features stack: stack preload and tls access method > (compiler native or system API)? When compiler native TLS is disabled and file define HB_STACK_PRELOAD before including harbour header files then each function which have to access hb_stack buffers it's address by HB_STACK_TLS_PRELOAD. If possible assembler inline function is used to retrieve stack address which is a little bit faster then call to OS TLS function and even native TLS support in some compilers (f.e.BCC). Compile current SVN code without any additional switches and compare the tstspeed.prg results to previous ones. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour