* harbour/source/vm/hvm.c
! execute hb_vmThreadQuit() after hb_vmStackRelease()
* harbour/source/vm/thread.c
* do not destroy critical sections on exit
* make_b32.mak
* make_vc.mak
* make_gcc.mak
! Minor formatting.
* include/hbapierr.h
! Fixed casting in macro HB_ERR_FUNCNAME, as it was
generating a new warning with MSVC in 64-bit mode.
'( ( char * ) 1 )' -> '( ( const char * ) NULL + 1 )'
('const' keyword was not enough to silence it)
* include/hbapierr.h
* source/rtl/errorapi.c
- Disabled (marked with HB_LEGACY_LEVEL) hb_errFuncName
symbol. No longer supported, pls use HB_ERR_FUNCNAME
instead.
* harbour/include/hbthread.h
* casting cleanup
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/scroll.c
* harbour/source/rtl/console.c
* harbour/source/rtl/box.c
* changed hb_gtDrawBox() and hb_gtPutText() to operate on color
number (index in some GTs) instead of color string
* use int as color number (index) in hb_gtScrollEx() hb_gtBoxEx()
* harbour/source/rtl/box.c
% changed DISPBOX() with color and frame string to work as one
GT atomic operation
* harbour/source/vm/classes.c
! fixed profiler usage
* bin/bld.bat
* bin/bld_os2.cmd
+ Enabled cleanup of .c/object/.tds files after build.
+ Under Windows NT OSes, it's now possible to pass full .prg
name with extension.
! Few minor fixes.
* Formatting, cleanup and help update.
; Please test.
* harbour/source/rtl/tget.prg
! fixed cursor positioning when new get item is added.
; added note about possible modification - Viktor, please verify it
* harbour/source/common/expropt2.c
* formatting and minor cleanup
* harbour/source/rtl/gtapi.c
% do not set and restore default color set in hb_gtPutText() and
hb_gtDrawBox() but decode colors from passed string
* include/hbextern.ch
+ New functions added.
* source/rtl/alert.prg
% Minor optimization.
; NOTE: Found yet another hidden extension in Alert() code :(
* source/rtl/radiobtn.prg
! Fix and optimization in recent modification.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added C functions hb_gtLock() and hb_gtUnlock()
They block current GT for other threads
* harbour/source/rtl/gtfunc.c
+ added PRG functions hb_gtLock() and hb_gtUnlock()
They block current GT for other threads - be careful using them
and always unlock locked GT
* harbour/source/rtl/scroll.c
+ added HB_SCROLL() function - it works like SCROLL() but supports
2 additional parameters: color and erase char. It's stateless and
atomic in GT access
* harbour/source/rtl/tbrowse.prg
* use HB_SCROLL() instead of SCROLL(). Now whole TBROWSE class
does not depend on other thread screen output and does not
set any GT variables except of cursor positioning to active
cell when it's enabled
* harbour/source/rtl/memoedit.prg
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/tlabel.prg
* harbour/source/rtl/listbox.prg
* harbour/source/rtl/tmenusys.prg
* harbour/source/rtl/achoice.prg
* harbour/source/rtl/profiler.prg
* harbour/source/rtl/teditor.prg
* use atomic stateless functions when possible - this code should
be checked and updated by some who know it.
* harbour/source/rtl/scrollbr.prg
* harbour/source/rtl/getsys.prg
* harbour/source/rtl/tpopup.prg
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/radiogrp.prg
* harbour/source/rtl/listbox.prg
* harbour/source/rtl/checkbox.prg
* harbour/source/rtl/browse.prg
* harbour/source/rtl/tget.prg
* harbour/source/rtl/ttopbar.prg
* harbour/source/rtl/pushbtn.prg
* harbour/source/rtl/tmenusys.prg
* harbour/source/rtl/achoice.prg
* harbour/source/rtl/teditor.prg
* harbour/source/rtl/radiobtn.prg
* harbour/source/rtl/tbrowse.prg
* replaced DispOut() with hb_dispOut()
* replaced DispBox() with hb_dispBox()
% removed saving and restoring of cursor position in places where
it's not longer necessary due to hb_dispOut()/hb_dispBox() usage
% removed saving and restoring of SetColor() value in places where
it's not longer necessary due to hb_dispOut()/hb_dispBox() usage
% removed saving and restoring of MSetCursor(). If it's necessary
low GT driver should hide and redraw mouse cursor before and after
screen update. We do not have to make it manually
The above modification gives faster code and allow to access screen
from different threads simultaneously because functions like
hb_dispOut() and hb_dispBox() are stateless and atomic in screen
access. Not all .prg code has been updated yet. If someone is
familiar with this code then please help. I'll add yet HB_SCROLL()
function which will support additionally colors.
Viktor if possible please verify this modifications.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added hb_gtDrawBox() works like hb_gtBox() but does not change cursor
posiion and support colors
+ added support for color parameter to hb_gtPutText()
* harbour/source/rtl/console.c
* use new hb_gtPutText() format in HB_DISPOUTAT()
Now all screen operations inside this function is one atomic
operation for other threads
* harbour/source/rtl/box.c
+ added HB_DISPBOX() function - works like DISPBOX() bit does not
change cursor position and is atomic for other threads
* harbour/include/hbapigt.h
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtclip.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/contrib/gtalleg/gtalleg.c
* harbour/contrib/gtalleg/ssf.h
* harbour/contrib/gtalleg/ssf.c
* harbour/contrib/gtwvg/gtwvg.c
* cleanup char * casting
* harbour/source/rtl/filesys.c
! do not use pread()/pwrite() in OpenWatcom Linux builds
* harbour/source/vm/hvm.c
* reduced the mutex lock time in thread exit state
* harbour/source/vm/thread.c
; added note about possible behavior of hb_threadSelf() function
in one very specific situation. It's documented and expected
behavior
* harbour/source/rtl/hbgtcore.c
+ added support for retrieving current HB_GTI_NOTIFIERBLOCK code block
+ added support for removing HB_GTI_NOTIFIERBLOCK code block without
setting the new one
* harbour/source/vm/garbage.c
* unblock HVM before executing destructors and releasing blocks
* harbour/source/vm/fm.c
! do not call internal error with active lock when FM statistic
is enabled
* harbour/source/vm/thread.c
! stop other threads in hb_threadOnce() if the 1-st one
executes bAction block to be sure that it will be completed
before thread leave hb_threadOnce() function
* harbour/source/vm/set.c
! do not call hb_inkeyReset() in set release. It's not necessary
and it could change keyboard buffer size for other threads using
the same GT driver.
* harbour/source/vm/hvm.c
% allocate new thread stack without lock
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
* moved clipboard resetting from hbgtcore.c to gtapi.c
* harbour/source/rtl/filesys.c
! do not use read/write operations with given file offset in Win9X
which seems to not support such functionality
* make_b32.mak
* make_vc.mak
* make_gcc.mak
* Removed special 'set HB_GT_LIB=gtXXX' support. For the exact
same effect - in case you want to modify default GT at
build time, which is not recommended -, pls use this:
'set C_USR=-DHB_GT_LIB=XXX' where XXX is 'wvt', 'std', etc.
- Removed HARBOURFLAGSDLL, LDFLAGSDLL, CFLAGSDLL as public options.
It's better to keep these settings common IMO, and handle
all DLL subtleties in our make files.
+ L_USR is now respected for .dlls, too.
! Fixed make_gcc.mak internal HARBOURFLAGSDLL to be in sync
with the other .mak files (removed -l switch).
- Removed HB_BUILD_MODE for VC builds. Now C/C++ is left to
the default value (which is C mode for core), and it's possible
to override using:
'set C_USR=-TP' for C++ mode (or -TC for forced C mode).
% Other minor cleanups.
* contrib/mtpl_b32.mak
* contrib/mtpl_vc.mak
- Removed HB_BUILD_MODE undocumented options from contrib
make files. For Borland C++ mode, use 'set C_USR=-P'.
For VC, see above.
- Removed HB_BUILD_ST undocumented option.
% Other minor cleanups.
* contrib/xhb/hbcompat.ch
* contrib/xhb/xhb.ch
! Moved __COPYFILE() translation to xhb.ch.
* common.mak
* make_b32.mak
* make_vc.mak
* make_gcc.mak
- Removed option HB_BUILD_ST to build another version
of Harbour MT build [for non-GNU builds], or forced
SingleThreaded (non -tWM) Harbour builds.
* Modified to not allow CFLAGSMT to be tweaked from the
outside [for non-GNU builds].
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added hb_vmProcessDynLibSymbols() which works like
hb_vmProcessSymbolsEx() but always mark registered modules as
dynamic
* harbour/source/vm/maindllp.c
* redirect hb_vmProcessSymbolsEx() to hb_vmProcessDynLibSymbols()
* harbour/source/vm/thread.c
* disabled some low level locking code in non MT HVM mode
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
+ added new GT methods: LOCK() and UNLOCK()
* serialize GT access in MT mode - please remember that it's only
low level serialization to protect access to low GT resources.
It has nothing to application level screen output from different
threads which has to be serialized by programmer if necessary.
* harbour/source/rtl/tthreadx.prg
* use HB_THREAD_INHERIT_PUBLIC as thread attribute for thread
started by oThread:start() to emulate xbase++ PUBLIC variables
behavior
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added hb_gtPutText() C function
* harbour/source/rtl/console.c
+ added HB_DISPOUTAT() which works like DISPOUTAT but does not change
cursor position. xBase++ users can use
#xtranslate DispOutAt( <x,...> ) => hb_dispOutAt( <x> )
for xBase++ compatible code
* harbour/common.mak
* harbour/source/rtl/Makefile
+ added thfuncx.prg
* harbour/source/rtl/thfuncx.prg
+ added ThreadObject() function
* harbour/source/rtl/tthreadx.prg
+ added xBase++ compatible TThread class.
Special thanks to Pritpal Bedi for class skeleton with info about
xbase++.
Now only basic functionality is supported though it was enough to
compile and execute examples Pritpal sent. I'm leaving rest for
xBase++ users.
BTW The examples suggest that in xbase++ DispOutAt() does not change
cursor position. It's not Clipper compatible so I cannot make it
in Harbour though I can add new function which will work in such way.
! harbour/bin/bld.bat
+ Added _C_MT=-tWM if HB_MT==MT
BCC32 includes cw32mt.lib if -tWM is present as a switch.
Now setting HB_MT=MT will allow to compile and link a prg in MT mode.
- bin/hb_flst.tmp
* bin/pack_src.sh
- removed the temporary file list from SVN.
* Added code to retrieve the source file list when SVN info is not available
* harbour/source/vm/hvm.c
* changed the place where exception handles are set/remove.
Now it's set at the beginning of hb_vmInit() and removed
at the end of hb_vmQuit()
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbf1.c
! added workaround for problem with EVAL block used in PACK
command
* harbour/source/compiler/hbmain.c
* minor simplification
* include/hbextern.ch
+ Added missing HB_DISABLEWAITLOCKS().
; NOTE: This looks like a hack to add FLX_WAIT flag
for locks app-wide, and on Windows systems only.
IMO we should not have such hacks in core, or if
this is really important it should support all
possible platforms.
It also has a low-level function equivalent,
which is missing from hbapifs.h. There is no
reference to these function in any Harbour or
xhb changelogs.
If there are no objections, I'd like remove
this functionality.
* source/rtl/hbrandom.c
* source/rtl/filesys.c
* Minor formatting.
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
% do not add dummy entries to symbol table for functions declared
as dynamic - it allows to include hbdynamic.ch with list of all
supported functions by application and/or harbour.dll to any .prg
file which will be used to create shared library (.dll, .so, ...)
without any memory overhead.
* harbour/source/compiler/genc.c
% do not generate unnecessary HB_FUNC_EXTERN() declarations for
function declared as DYNAMIC
* harbour/include/hbtypes.h
* harbour/source/vm/maindllp.c
! updated casting for current SVN code
[TOMERGE 1.0]
* harbour/include/hbthread.h
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
+ added .prg function
hb_threadWait( <pThID> | <apThID>, [ <nTimeOut> ] [, <lAll> ] )
=> <nThInd> | <nThCount> | 0
This function wait for <nTimeOut> seconds (default infinite wait)
until one or all (controlled by <lAll> parameter) of given HVM threads
will have finished execution in HVM area. It does not join the threads.
It returns index to 1-st thread which has finished execution (default)
or number of threads which has finished in given time period when lAll
is .T.
* bin/bld.bat
* bin/bld_os2.cmd
+ Added support for HB_INSTALL_PREFIX.
+ Added experimental support for 'set HB_MT=MT' flag,
to create an MT executable.
* source/rtl/seconds.c
* Formatting.
* source/vm/cmdarg.c
* HB_ARGV() will now return the executable name if called
without a parameter.
! HB_ARGSTRING() fixed to return "" in some error
cases instead of NIL.
* source/compiler/gencc.c
* Trick to avoid MSVC -W4 warnings in -gc3 compiled C code,
when compiled string literal contained certain high (> 127)
chars followed by a digit. Thanks Przemek.
NOTE: I've checked and hexadecimal format has even more
such problems.
* harbour/source/vm/runner.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/itemapi.c
* minor casting modification
* harbour/tests/speedtst.prg
* added workaround for timeout parameter not working in xHb Subscribe()
when 3-rd parameter is passed
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
% moved static USHORT uiPolls to HVM stack to not reduce the HVM
performance in MT mode. In multi CPU environment if many threads
try to change the same memory variable in the same time the overall
performance is strongly reduced on most of tested hardware - probably
some random CPU delay used to resolve the conflict.
* harbour/source/rtl/seconds.c
+ Added OS/2 section to secondsCPU(), but it does not work as expected :)
In particular, user and system times are kept per thread, but when a thread
dies the time it has spent in user and system-land gets lost, so the
overall running time of the program decreases. Not only, if I call
secondsCPU() before a thread starts and after it has ended I'll have
no idea of the time that was spent by that thread.