* harbour/source/rdd/workarea.c
* added protection against multiple registering RDD with the same
name by *_GETFUNCTABLE() in ST/MT mode or other thread in MT mode
* harbour/include/hbvm.h
* harbour/include/hbthread.h
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
+ added hb_vmThreadRegister() funtion which allows to register new
thread in HVM without HVM stack allocation
+ added hb_vmThreadRelease() which removes registered thread which
does not have allocated HVM stack yet
+ added hb_threadStateNew() which returns new thread control state
which can be used as parameter to hb_vmThreadInit(),
hb_vmThreadRegister(), hb_vmThreadRelease()
* register thread control state also for main thread
Now hb_threadSelf() returns thread pointer also for main thread
! fixed possible race condition in hb_threadWaitForAll() and
hb_threadTerminateAll() by using hb_vmThreadRegister() before
starting thread.
* harbour/source/rtl/idle.c
* interrupt hb_idleSleep() on QUIT or BREAK requests
* harbour/tests/mt/mttest09.prg
* small cleanup
* harbour/source/vm/thread.c
* release thread return value when is retrieve
* harbour/common.mak
* harbour/source/rtl/Makefile
+ harbour/source/rtl/tthreadx.prg
+ added xBase++ compatible signal class
* harbour/source/rdd/wacore.c
! added missing alias setting after attaching work area
+ harbour/tests/mt/mttest09.prg
+ added test code for using the same work area in different threads
* 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.
Please check the speed difference. If it will be noticeable
then we keep them probably as default. Otherwise they will be
removed.
* make_b32.mak
* make_gcc.mak
* make_vc.mak
* harbour.spec
* source/rtl/hbgtcore.c
* source/rtl/Makefile
* source/rtl/gtsys.c
* config/w32/poccce.cf
* config/w32/xcc.cf
* config/w32/pocc.cf
% Removed HB_GT_DEFAULT envvar, which was the exact synonym
of HB_GT_LIB. Please use HB_GT_LIB instead, if you - by any
chance - want to change the default GT at Harbour build-time.
* tests/speedtst.prg
! Fixed to delete temp .dbf files before exiting.
* source/vm/fm.c
+ Enabled dlmalloc (HB_FM_DL_ALLOC) for MSVC, BCC and MINGW builds.
; It's possible to disable dlmalloc with HB_FM_STD_ALLOC
for testing purposes.
* bin/bld.bat
* bin/bld_os2.cmd
* HARBOURFLAGS removed as a public envvar to setup Harbour
parameters. Use PRG_USR instead.
* common.mak
! Fixed after recent modification.
* source/compiler/cmdcheck.c
* Minor formatting.
* harbour/source/compiler/cmdcheck.c
! fixed starting index in parsed parameters. argv[0] is
application name with path not user parameter. Parsing
it was giving unpredictable results if harbour binaries
were located in path having option delimiters in name
* source/vm/vmmt/Makefile
! Possible fix for mingw build error:
make: *** mainstd: No such file or directory. Stop.
make[3]: *** [first] Error 2
make[2]: *** [first] Error 2
; Please review.
; TOFIX: These DLALLOC warnings are present with MinGW 4.3.2
In file included from ../../fm.c:127:
../../dlmalloc.c:1144: warning: ignoring #pragma warning
In file included from ../../fm.c:127:
../../dlmalloc.c: In function 'sys_alloc':
../../dlmalloc.c:3396: warning: statement with no effect
* common.mak
* source/rtl/gtgui/Makefile
- source/rtl/gtgui/gtdef.c
- Removed HB_GTGUI_HACK to masquerade GTGUI under a different
name and to make Windows users happier. Instead of hacking
Windows users with GUI programs should simply use
this in their code:
--
PROCEDURE HB_GTSYS
REQUEST HB_GT_GUI_DEFAULT
RETURN
--
; This clears up a few exceptions, make hacks and a few possible
confusions.
* source/rtl/gtsys.c
* Added HB_WINCE with GTWVT to the set of defaults.
* config/darwin/global.cf
* config/hpux/global.cf
* config/linux/global.cf
* config/sunos/global.cf
* config/bsd/global.cf
% Removed unnecessary defaulting to GTSTD.
* config/os2/gcc.cf
! Fixed minor typo in line 24 / HB_OS2_NEW_TCP.
* tests/memtst.prg
+ Added #include "simpleio.ch" to allow output redirection.
* bin/bld.bat
* bin/bld_os2.cmd
* Removed any HB_GT_LIB "selection" logic. Selection is to
be done from source code, from now on all supported core GTs
are included in the lib list.
* Few other minor cleanups.
* source/vm/cmdarg.c
* Commented code turned into HB_C52_STRICT branch.
* source/vm/vmmt/Makefile
! Fixed cemgw -> mingwce
* config/dos/global.cf
* config/os2/global.cf
* config/w32/global.cf
% Removed unnecessary logic to select default GT. This is
done in Harbour source code now.
; TOFIX: After MT changes, mingw32 build gives this new error:
make: *** mainstd: No such file or directory. Stop.
make[3]: *** [first] Error 2
make[2]: *** [first] Error 2
* harbour/bin/hb-func.sh
* use HB_IMPORT instead of hardcoded attributes in hb* scripts
* harbour/source/common/hbver.c
* generate different info for POCC and XCC compilers
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* reduce header validation to not report clipper indexes as corrupted
* source/vm/extrap.c
! Fixed to close .log file before showing MessageBox().
[TOMERGE 1.0]
+ Don't attempt to write into .log file if the _SET_HBOUTLOG
filename is empty.
; TOFIX: Remove all remaining MessageBox() calls from
Harbour sources.
* contrib/rddads/adsmgmnt.c
! Blind fix to ADSMGGETWORKERTHREADACTIVITY() where the
first element in list wasn't returned.
Please test, I couldn't.
* source/vm/fm.c
! Stupid typo. (I guess I'm completely confused by separated
"#" and preprocessor command :/ Second typo in two lines.)
* harbour/source/vm/codebloc.c
* updated old and not longer valid comment
* harbour/source/vm/memvars.c
* minor code formatting
* harbour/source/common/expropt2.c
! fixed bug in power math expression optimization caused
by two lines left in the code by mistake. Many thanks to
Maurilio for locating the problem.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
% added support for buffering hb_stack TLS access be preloading
the stack pointer into C stack function local variables.
Please make speed tests for MT mode with different C compilers
and different platforms.
* source/vm/fm.c
! Enabled USE_DL_PREFIX for _MSC_VER compilers.
This may be refined, but without this setting MSVS 2008
would give an error on exit and GPF.
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* do not allow to close production index by ordBagClear() when
strict FP compatibility is set for production index or when
_SET_AUTOPEN is enabled. It compatible behavior to ordListClear()
function
* harbour/ChangeLog
! corrected previous ChangeLog entry: instead of hb_waDetach()/
hb_waRequest() should be db_dbDetach()/hb_dbRequest()
* harbour/source/vm/hvm.c
* disabled PRG tracing in default builds. If someone wants to
use this feature then he should recompile Harbour with HB_PRG_TRACE
macro. In such case tracing can be enabled/disabled by __TRACEPRGCALLS()
function. HB_NO_TRACE macro is not longer usable - it's default in
current code.
* harbour/source/vm/classes.c
+ added PRG function __clsPreallocate() which extends the size of
classes buffer to given value to avoid later RT reallocations.
It may be useful in some very seldom cases for MT programs which
will allocate dynamically at runtime more then 16386 classes.
In practice rather impossible though who knows ;-)
* harbour/source/rdd/workarea.c
* set default preallocation size for RDD nodes to 128
+ added PRG function __rddPreallocate() which extends the size of
RDD nodes buffer to given value to avoid later RT reallocations.
It may be useful in some very seldom cases for MT programs which
will register dynamically at runtime more then 128 RDDs when other
threads are active and may use RDD nodes.
* harbour/include/hbrddcdx.h
* harbour/source/rdd/dbfcdx/dbfcdx1.c
+ added ORDLSTDELETE() method.
Now ordbagClear() should work for DBFCDX.
* make_b32.mak
* make_vc.mak
* common.mak
* source/rtl/hbgtcore.c
! Any messing with HB_GT_LIB and HB_GT_DEFAULT was removed
from non-GNU make files, to leave these things to the
source code itself (just like in GNU-make).
+ Added automatic selection of GTWVT from source code,
so that it also works in GNU-make.
* source/rdd/dbfcdx/dbfcdx1.c
! Restored RTE behaviour when key length is zero.
! Recently added C53 compatible but C52 incompatible
RTE enabled only if HB_COMPAT_C53 and HB_C52_STRICT
are both #defined to not make valid C52 apps crash.
; Someone pls review me.
* harbour/source/rtl/hbregex.c
* added hack to force linking newer PCRE versions not the one included
in BCC RTL when Harbour is compiled without HB_PCRE_REGEX_BCC.
If user application will uses regex expressions (directly or indirectly
by some RTL functions) then lining it without HBPCE should give link
time error that pcre_config() function is missing.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added support for using stack macros without native compiler TLS
support in MT mode.
* enabled stack macros by default for OS2 MT builds
David, if possible please try speedtst.prg with current MT HVM
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
+ added .prg function hb_threadSelf() -> <pThID> | NIL
It returns thread ID pointer variable or NIL when thread was
registered without it (main thread and some 3-rd party threads
created by C API)
* harbour/source/vm/hvm.c
* protect s_InitFunctions and s_ExitFunctions by mutex
* harbour/source/common/hbverdsp.c
* use hb_verBuildDate() instead of __DATE__ and __TIME__ in
hb_verBuildInfo() function to report the same time in both
cases.
* harbour/include/hbapi.h
* harbour/source/vm/arrays.c
+ added hb_arrayGetPtrGC(), hb_arrayGetSymbol(), hb_arraySetSymbol()
* harbour/include/hbapi.h
* harbour/source/vm/dynsym.c
+ added hb_dynsymProtectEval(). Works like hb_dynsymEval() but
keeps dynamic symbol table locked during whole execution.
It's faster then hb_dynsymEval() but user function may not
access dynamic symbol tbale to not cause recursive locks
+ added protection against possible dynamic symbol table resizing
during hb_dynsymEval() by other threads.
* harbour/include/hbapi.h
* harbour/source/vm/memvars.c
+ added hb_memvarSaveInArray( int iScope, BOOL fCopy ) and
hb_memvarRestoreFromArray( PHB_ITEM pArray )
% use hb_dynsymProtectEval() in places where it's safe
* harbour/include/Makefile
+ harbour/include/hbthread.ch
+ added header file with thread constant definitions:
HB_THREAD_INHERIT_PUBLIC
HB_THREAD_INHERIT_PRIVATE
HB_THREAD_INHERIT_MEMVARS
HB_THREAD_MEMVARS_COPY
* harbour/include/hbthread.h
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
+ added support for inheriting visible memvars from current
thread when new thread is created. Memvars in child thread
can be shared with parrent or they can be copied. See HB_THREAD_*
attributes defined in hbthread.ch, f.e.:
hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @thFunc() )
or:
hb_threadStart( HB_BITOR( HB_THREAD_INHERIT_MEMVARS + ;
HB_THREAD_MEMVARS_COPY ), ;
@thFunc() )
Please note that when child thread creates new PUBLIC variable
which didn't existed when thread was started then it's visible
only for this thread and optionally for its child threads but
not for parent thread.
Please also remember that write access to shared memvars have
to be protected by users.
+ harbour/tests/mt/mttest08.prg
+ added test code for thread memvars inheritance
* harbour/common.mak
* harbour/source/rdd/Makefile
! restored dbdetach.* in makefiles
+ harbour/source/rdd/dbdetach.c
+ added file I forgot to add in previous commit
* harbour/source/vm/thread.c
+ added support for using function name as string in HB_THREADSTART()
+ added support for thread attributes. They will be used in the future.
+ harbour/source/rdd/wadetach.c
+ added .prg functions:
hb_waDetach( [<nWorkArea>|<cAlias>], [<xCargo>] ) -> <lSuccess>
hb_waRequest( [<cAlias>], [<lFreeArea>], [<@xCargo>], [<lWait>] )
-> <lSuccess>
The first one detach workarea from current thread and move it
to special hidden holder. Before detaching all relations (parent
and child) to detached workarea are cleared.
The second one restores area from the holder and attach it
to calling thread.
+ added xBase++ compatible functions DbRelease() / DbRequest()
xBase++ users please test. If possible please also check what xBase++
does with relations and active RLOCKs/FLOCK on released WA.
* contrib/hbbmcdx/bmdbfcdx.c
* source/rdd/dbfcdx/dbfcdx1.c
! fixed return value after rt error.
* Added rt error as in clipper when OrdkeyVal is greater than 240, with default
capabilities as in clipper.
code to test it:
FUNCTION MAIN()
LOCAL i
LOCAL nSec := SECONDS()
REQUEST DBFCDX
RddSetDefault( "DBFCDX" )
DBCREATE( "__MYTEST", { { "test", "C", 241, 0 } } )
USE __MYTEST
INDEX ON FIELD->Test TO __MYTEST
FOR i := 1 TO 10
APPEND BLANK
FIELD->test := Replicate( "1", 240 ) + Str( 10 - i, 1 )
NEXT
DbGoTop()
? &(OrdKey())
? "Length of &(OrdKey()) :" + Str( Len( &(OrdKey()) ) )
? OrdKeyVal()
? "Length of OrdKeyVal() :" + Str( Len(OrdKeyVal()) )
WHILE ! EOF()
? Right( FIELD->Test, 1 )
DbSkip()
ENDDO
USE
FERASE( "__MYTEST.DBF" )
FERASE( "__MYTEST.CDX" )
RETURN NIL
* harbour/make_rpm.sh
* use rpm to test if curl-devel package is installed
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ added hb_strduptrim() and hb_strlentrim()
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! control total length of KEY and FOR expression together
to be compatible with other CDX drivers.
Total length of both expressions cannot exceed 512 bytes
(with two trailing ASCII 0 characters)
* contrib/hbbmcdx/bmdbfcdx.c
* source/rdd/dbfcdx/dbfcdx1.c
! fixed generation error when length of key is greater than 256 as Clipper.
instead of wait for internal error.
* Used defined errors instead of hardcoded numbers.
* harbour/source/vm/fm.c
+ harbour/source/vm/dlmalloc.c
+ added alternative memory manager written by Doug Lea
It can be activated by recompiling Harbour with HB_FM_DL_ALLOC macro.
Please make test on different platforms with different C compilers.
Linux users will not benefit from it because the default GLIBC MM
is derived from a version of code.
NOTE: the results may strongly depend on total memory allocation
and will be different then in simple memory tests.