Alexander,

Here's an example from hbserv.c:

#ifdef HB_THREAD_SUPPORT   HB_STACK *pStack = NULL;
    /* we need a new stack: this is NOT an hb thread. */
    if ( TlsGetValue( hb_dwCurrentStack ) == 0 )
    {      pStack = hb_threadCreateStack( GetCurrentThreadId() );
       pStack->th_h = GetCurrentThread();
       TlsSetValue( hb_dwCurrentStack, ( void * ) pStack );
    }
#endif

HTH,

Ron

On Mar 31, 2008, at 11:48 PM, Alexander S.Kresin wrote:
Ron,

   thanks for an explanation.

   As I understand, the problem appears, because xHarbour Builder links
mt          versions of xHarbour libraries ( what is quite logical ),
while I need only mt versions of Pelles C be linked.
   I've created a bat file, which doesn't use any make system and
directly calls xcc, xlink and xlib and have created letodb.exe and
rddleto.lib with it - and the server works normally now.
   But before uploading this bat to CVS I'd like to know, is there a way
to do the same ( link mt versions of Pelles C and non mt - of xHarbour )
with xHarbour Builder, or, maybe, there is any other make system,
included in xhb release ?

> We may possibly change the HB_TREAD_STUB macro or
> hb_threadGetCurrentStack() macro to deaflt to the primary stack if no
> thread stack is found. Otherwise you may explicitly associate an HVM
> STACK, f.e. hb_stackMT with any C thread created outside the knowledge
> of xHarbour.
>

   Could you show how to do this ?

Regards,
    Alexander.

------------------------------------------------------------------------ 
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/ 
marketplace
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to