Hi Maurilio,
I've added this little function to my copy of vm\thread.c, I attach
it here so
that Przemyslaw and/or Viktor can have a look at it and also because
I'm not
at ease with branching and so I don't know where to commit this
change.
-----------8<-----------------
HB_FUNC( HB_THREADID )
{
#if defined( HB_MT_VM )
PHB_THREADSTATE pThread = ( PHB_THREADSTATE ) hb_vmThreadState();
if( pThread )
hb_retnl( pThread->th_id );
#endif
}
----------->8-----------------
I see no problem with this code. You can just simply
commit it to the trunk (as usual).
Well, that said, total time went from 70 seconds to 59.9 :)
Looks good :)
MT PIV 3.6GHZ HT, OS/2 SMP kernel
============================================================
0 - total application time: 59.87
total real time: 59.88
I,ve also noted that thread 1 has a threadid of 0 (zero) while the
other
threads have the correct id, maybe this is a minor glitch to correct.
IMO, zero for main thread is alright.
Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour