Przemyslaw,
no, I've changed it this way
static mspace hb_mspace( void )
{
HB_STACK_TLS_PRELOAD
//if( hb_stackId() && hb_stack.allocator )
#undef hb_stackTotalItems
if( hb_stackTotalItems() && hb_stack.allocator )
return ( ( PHB_MSPACE ) hb_stack.allocator )->ms;
if( !s_gm )
s_gm = create_mspace( 0, 1 );
return s_gm;
}
but it still dies upon startup.
Maurilio.
Przemysław Czerpak wrote:
> On Tue, 24 Nov 2009, Maurilio Longo wrote:
>
> Hi,
>
>> No,
>> even changhing it this way:
>> dlmalloc.c[1452] onward
>> #if /*defined( HB_OS_OS2 ) ||*/ defined( HB_OS_WIN ) || defined( __WATCOMC__
>> )
> [...]
>> did not solve the problem and hbmk2 dies as soon as it is called.
>
> I haven't expected that disabling spin locks will help. I only
> wanted to be sure that spin locks are used by default in OS2 builds.
> I think that the problem is inside hb_mspace() when it's executed
> before HVM stack is initialized. In OS2 we have unique to other systems
> method to access TLS and it will cause GPF if we try to access hb_stack
> pointer before TLS key is initialized.
> If I'm right and this is the source of problem then it should be enough
> to make small modification in hb_mspace() function and replace:
>
> if( hb_stackId() && hb_stack.allocator )
>
> with:
>
> #undef hb_stackTotalItems
> if( hb_stackTotalItems() && hb_stack.allocator )
>
> Can you restore spin locks and test above code?
>
> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
--
__________
| | | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour