Hello Przemek, Marek, Viktor
Przemyslaw Czerpak-2 wrote: > >> Exactly like Marek says. hb_stack*() API is not a public API, it's >> reserved for >> internal Harbour usage. It's needed for a proper separation of layers / >> components. > > I agree. Number of public functions does not increase functionality but > seriously reduce possible odifications > in core code due to compatibility with existing 3-rd party code. > Now I understand better. If it been the case we must be cautious about introducing them. Anyway, not a big deal. I will update those files. Przemyslaw Czerpak-2 wrote: > > Additionaly I will have to add two new functions: > hb_stackGetTSD() and hb_stackTestTSD() which will be used in some other > RTL files. They are necessary for thread specific data - static variables > local to thread. It's very important feature which allows to keep common > MT and ST code. Below I'm attaching ChangeLog for modifications which > introduce TSD support > to Harbour in .prg and .c level. > :-)))) Guys be prepared for real-time Multi-threading in Harbour. MASTER is up and running. Przemyslaw Czerpak-2 wrote: > > * harbour/source/rtl/xsavescr.c > * use TSD data for screen buffer to make > __XSAVESCREEN()/__XRESTSCREEN() > thread independent > > * harbour/source/rtl/setkey.c > * use TSD data for allocated keys to make SETKEY() thread independent > > * harbour/include/hbapigt.h > * harbour/source/rtl/console.c > * removed hb_setkeyInit() and hb_setkeyExit() - they are not longer > necessary, allocated resources will be freed by TSD destructor > function > > * harbour/include/hbapi.h > * harbour/source/rtl/console.c > * removed hb_conXSaveRestRelease() - it's not longer necessary, > allocated resources will be freed by TSD destructor function > > * harbour/source/rtl/perfuncs.prg > * harbour/source/rtl/menuto.prg > * harbour/source/rtl/getlist.prg > * harbour/source/rtl/readvar.prg > * harbour/source/rtl/text.prg > * use STATIC THREAD variables to make above code MT safe > Interesting. And most-interesting part is getlist.prg and readvar.prg. Even Xbase++ does not have this feature. Przem, keep in mind that WA must also be thread save like Xbase++ as this feature alone in Xbase++ is a MARVEL in itself. I must be able to open same table in different threads without changing alias, e.g., USE (MyTable) NEW ALIAS "MYTABLE" SHARED And thanks for your superb guidance, clarifications and contributions. Regards Pritpal Bedi, INDIA-USA -- View this message in context: http://www.nabble.com/2007-11-30-20%3A25-UTC%2B0100-Marek-Paliwoda-%28mpaliwoda-at-interia-pl%29-tp14096398p14704048.html Sent from the Harbour - Dev mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour