* 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.
* include/hbapierr.h
* source/vm/extrap.c
* source/rtl/errorint.c
! Fixed recent modification on Windows platform, where
GPF would generate an internal error.
It didn't launch the OS error handler.
! Fixed hb_errInternal() being marked as HB_EXPORT
in the headers only.
* include/hbextern.ch
* source/rtl/inkey.c
+ Added HB_KEYCLEAR() a documented function equivalent
to "CLEAR TYPEAHEAD" command, or undocumented __KEYBOARD() function.
* contrib/rddads/rddads.h
* contrib/rddads/ads1.c
+ Added support for ADS_USE_OEM_TRANSLATION for old ads versions.
Borrowed from xhb/Pavel Tsarenko.
* harbour/include/Makefile
+ harbour/include/hbatomic.h
* harbour/include/hbthread.h
* harbour/source/vm/garbage.c
* harbour/source/vm/fm.c
* moved atomic and spinlock functions into hbatomic.h
* harbour/include/hbatomic.h
+ added atomic inc/dec for GCC and x86@64 and PPC@32
+ use OSAtomic*() and OSSpin*() functions for atomic inc/dec and
spinlocks in Darwin builds
+ added spinlocks to MS-Win builds
* harbour/source/vm/hvm.c
! fixed last commit typo in thread number allocating - all threads
where using 0 number
* harbour/source/vm/thread.c
! fixed return value in recursive call to hb_mutexLock() - was FALSE
! fixed typo in timeout parameter number
should be 2 instead of 1
* harbour/source/rtl/tobject.prg
! fixed init() return value - it should be ignored and current
object should be returned
* harbour/source/rtl/tthreadx.prg
! probably fixed timeout parameter use in signal:wait() method
I guess that like other xbase++ functions it's in 1/100th of
a second
* harbour/include/hboo.ch
* harbour/include/hbclass.ch
* harbour/source/vm/classes.c
* harbour/source/rtl/tclass.prg
+ added support for SYNC object and CLASS messages working like
in xBase++. Please remember that all locked by thread SYNC messages
objects and classes are unblocked automatically for the time which
thread spends in hb_subscribe[Now]() or signal:wait()
* include/hbapifs.h
* include/hbextern.ch
* source/common/hbfsapi.c
* source/rtl/hbfile.c
+ Added hb_fsNameExists() C level function.
+ Added hb_FNameExists() Harbour level function.
; Both will return true if any kind of directory entry
exists with the given name (IOW it doesn't matter
if it's a file or directory, or else).
* harbour/include/hbclass.ch
* harbour/include/hboo.ch
+ added SYNC attribute to accepted syntax in class declaration
it allows to compile code which uses this attribute but low
level implementation is not ready yet - work in progress
* harbour/source/vm/garbage.c
! added #define INCL_DOSPROCESS for OS2 builds. For some reasons
#define INCL_DOSDATETIME I've found in DosSleep() documentation
is note enough
* harbour/tests/speedtst.prg
* marked T054 as memory tests
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
* added hb_threadOnce( @<onceControl> [, <bAction> ] ) -> <lFirstCall>
This function allow to execute some code only once. It's usefull in
MT environment for initialization.
<onceControl> is variable which holds the execution status and have
to be initialized to NIL. In most of cases it will be simple static
variable in user code.
<bAction> is optional codeblock which is executed only once (on 1-st
call with given <onceControl>)
* harbour/source/rtl/filesys.c
! do not make any file name conversions in hb_fsNameConv() if HVM stack
is not allocated
* harbour/source/rtl/gtcrs/gtcrs.c
* casting
* source/debug/debugger.prg
* source/rtl/typefile.prg
* source/rtl/tgetlist.prg
* source/rtl/treport.prg
* source/rtl/teditor.prg
* Using [Q]QOut() functions instead of "[?]?" commands.
* Using hb_Run() function instead of RUN command.
* source/rtl/typefile.prg
% Upped read buffer.
* Formatting.
% Got rid of a few unnecessary initialization.
* harbour/tests/speedtst.prg
+ added support for --scale switch - it enables special mode
which compare scalability, f.e.:
./speedtst --thread=4 --scale
executes each test loop 4 times by single thread then
by 4 simultaneous threads, counts total real times in both
cases and presents them with the scale factor.
Please note that exactly the same loop tests are executed
simultaneously so this test should well show all places which
are not well scalable.
This test allows me to locate yet another memory variable written by
each thread on each function call just like uiPolls in main HVM loop.
It's s_bDebugging which is not used in MT mode because we do not have
any MT debugger yet but is was effectively killing the scalability
in my hardware.
If possible I would like to see some Windows results from multi CPU
machine with --scale parameter, f.e.:
speedtst --thread=8 --scale > speedtst.log
Please make some tests.
* harbour/source/vm/hvm.c
% do not assign s_bDebugging in hb_vmDo()/hb_vmSend() when debugger
is not linked
* harbour/source/vm/garbage.c
% enabled spinlocks in all x86 GCC builds
* harbour/tests/speedtst.prg
+ added support for multiple usage of --exclude parameter
+ added support for --thread[=<num>] parameter which allows to set how
many threads will be used to execute speed test. When =<num> is not
given then each test loop is executed by separate thread, f.e.:
./speedtst --thread=3
Now you can make tests looking for optimal for your system values.
Please only remember that the total results shown by speedtst
can be highly bound with the most expensive test loop which is
finished only on one CPU
+ added support for --only=<testnums,...> parameter which allows to
chose requested tests
+ added restricted parameter validation and syntax info
* harbour/source/vm/fm.c
! do not build DL-MM when HB_FM_WIN32_ALLOC is set
* harbour/tests/speedtst.prg
+ added support for --exclude=<tests,...> option to exclude some tests,
f.e.:
./speetest --exclude=029.030.023.025.027.040.041.043.052.053.019.022.031.032
disables all tests which allocates memory. The same tests can be also
excluded by --exclude=mem
- harbour/tests/speedtst.prg
+ harbour/tests/speedold.prg
* renamed old speed test - I left it because some other xbase compiler
cannot compiple the new one due to not Clipper compatible PP
+ harbour/tests/speedtst.prg
* added new speed test which can also measure mutlithread performance.
When linked with MT HVM version then it can be executed with optional
parameter which causes that each test loop is executed by separate
thread. Please make such tests on different platforms.
* source/vm/extrap.c
+ Now using standard internal error call for Windows too.
+ Implemented //BATCH for OS/2. (please test)
* source/rtl/errorint.c
* Upped internal buffer.
* contrib/hbole/oleauto.prg
* contrib/hbole/ole2.c
* contrib/hbwin/win_tole.prg
* contrib/hbwin/win_ole.c
* OLESHOWEXCEPTION() implemented on the .prg level, using
Alert() rather than MessageBox().
! All MessageBox()es converted to Alert()s.
+ Added OLEEXCEPTIONSOURCE(), OLEEXCEPTIONDESCRIPTION()
to hbole.
* source/vm/maindllp.c
! Changed MessageBox() call to internal error.
* contrib/gtwvg/gtwvg.c
* source/rtl/gtwvt/gtwvt.c
! Changed MessageBox() calls to internal error.
* contrib/gtwvg/gtwvg.c
* Internal error calls synced with GTWVT.
* source/rtl/hbgtcore.c
- Removed "Internal error" text from two internal error descriptions.
* make_vc.mak
- Removed reference to MessageBox() from comment.
; NOTE: No more MessageBox() calls in Harbour.
(except some wrappers for user .prg code)
* include/hbsetup.ch
! Removed some company names from comments.
* source/vm/extrap.c
+ Added //BATCH internal switch to indicate exception handler
to suppress the Windows exception dialog when an exception
occurs. Useful for programs running without user interaction.
NOTE: This may not be the ultimate method. If we can gather
more such situations where such "batch" mode might
be useful, we may as well implement it as a Set().
- Removed Harbour specific exception MessageBox(). Besides
having gotten rid of a MessageBox() call in core VM, Harbour now
got back the standard Windows error handling dialog, which is
more standard and easy to get by than the previous default
method, where several clicks were needed to pass through
the (sometimes hidden) popups. The details of all GPFs are
still logged into hb_out.log.
+ Removed size limit for the logged exception call stack.
* harbour/source/rdd/sdf1.c
! fixed stupid typo (missing !) in last modification which broke
SDF RDD read mode. Thanks to Marco for information and example.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* small cleanup in used macros
* harbour/include/hbstack.h
% enable assembler inline function to access HVM thread stack pointer
without native compiler TLS support even if HB_STACK_PRELOAD is not
defined in MinGW builds. It gives some additional small speed
improvement in MT mode
* harbour/source/rtl/idle.c
* unlock HVM inside hb_releaseCPU() function
* harbour/contrib/hbwin/win_ole.c
! fixed casting and C++ compilation in some compilers
* harbour/include/Makefile
+ harbour/contrib/examples/rdddbt/hbrdddbt.h
- harbour/include/hbrdddbt.h
! moved hbrdddbt.h to correct location
* harbour/include/Makefile
! added missinf hbthread.h
* harbour/tests/rddtest/rddmktst.prg
* harbour/tests/rddtest/adscl52.prg
* harbour/tests/rddtest/adscl53.prg
* harbour/tests/rddtest/ntxcl52.prg
* harbour/tests/rddtest/ntxcl53.prg
* harbour/tests/rddtest/cdxcl52.prg
* harbour/tests/rddtest/rddtst.prg
* harbour/tests/rddtest/cdxcl53.prg
! fixed description in header I wrongly copied without updating
from other files
+ harbour/tests/hsxtest.prg
+ added test code for HiPer-SEEK indexes
* harbour/source/rtl/filesys.c
+ added new functions: hb_fsExtName(), hb_fsReadAt(), hb_fsWriteAt(),
hb_fsTruncAt() to use with shared file handles.
Please test it in other *nixes. I used pread[64]()/pwrite[64]()
POSIX functions but I do not know if they are available by default
in other supported platforms like MacOSX, BSD, HPUX, SunOS.
If not they I will have to implement some workaround.
* harbour/common.mak
* harbour/source/rtl/Makefile
* harbour/include/hbapifs.h
+ harbour/source/rtl/filebuf.c
+ added set of new file functions (hb_file*()) which are designed to
use with shared file handles and locks (buffers in the future):
hb_fileExtOpen(), hb_fileCreateTemp(), hb_fileClose(), hb_fileLock(),
hb_fileReadAt(), hb_fileWriteAt(), hb_fileTruncAt(), hb_fileSize(),
hb_fileCommit(), hb_fileHandle()
These functions operate on PHB_FILE structure instead of HB_FHANDLE.
Now in POSIX systems they share file handle between aliased or
simultaneously open by other thread work areas. It resolves the
problem with releasing all process FCNTL locks by any close()
operation even on duplicated or open() separately handle.
Now DOS deny flags emulation works in single process even if
BSD locks are disabled (non Linux *nixes).
They also keep internal file lock list what allows to synchronize
threads and aliases with file locks in POSIX systems. In the future
it will be used also for internal locking to synchronize threads
without OS level locks - pseudo exclusive mode in cloned WA.
Finally these structures will be used also for file buffers
which will be shared between aliased WA and threads.
* harbour/include/hbrdddbf.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddntx.h
* harbour/include/hbrdddel.h
* harbour/include/hbrddsdf.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/contrib/hbbmcdx/bmdbfcdx.c
* harbour/contrib/hbbmcdx/hbbmcdx.h
* use PHB_FILE and hb_file*() functions instead of HB_FHANDLE (hb_fs*())
to access files.
+ harbour/tests/aliaslck.prg
+ added test code for file lock synchronization between aliased
work areas