Hi,
Przemyslaw Czerpak wrote:
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.
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
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.
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
Error E2451 source\vm\arrays.c 127: Undefined symbol '_hb_stack_ptr_' in
function hb_arrayReleaseGarbage
Error E2451 source\vm\arrays.c 911: Undefined symbol '_hb_stack_ptr_' in
function hb_arrayScan
Error E2451 source\vm\arrays.c 1059: Undefined symbol '_hb_stack_ptr_'
in function hb_arrayRevScan
Error E2451 source\vm\arrays.c 1404: Undefined symbol '_hb_stack_ptr_'
in function hb_arrayFromStack
Error E2451 source\vm\arrays.c 1420: Undefined symbol '_hb_stack_ptr_'
in function hb_arrayFromParams
Error E2451 source\vm\arrays.c 1441: Undefined symbol '_hb_stack_ptr_'
in function hb_arrayBaseParams
Warning W8013 source\vm\arrays.c 1443: Possible use of 'uiPCount' before
definition in function hb_arrayBaseParams
Error E2451 source\vm\arrays.c 1461: Undefined symbol '_hb_stack_ptr_'
in function hb_arraySelfParams
Warning W8013 source\vm\arrays.c 1463: Possible use of 'uiPCount' before
definition in function hb_arraySelfParams
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.
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)?
Best regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour