2008-10-02 15:50 UTC+0200 Maurilio Longo (maurilio.longo@libero.it)
* harbour/source/vm/thread.c
+ added hb_ThreadID() function which returns thread ID of current thread.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -122,7 +122,7 @@ static volatile BOOL s_fThreadInit = FALSE;
|
||||
{
|
||||
if( !s_fThreadInit )
|
||||
hb_threadInit();
|
||||
|
||||
|
||||
HB_CRITICAL_LOCK( s_critical_init );
|
||||
if( !cond->fInit )
|
||||
{
|
||||
@@ -671,6 +671,15 @@ HB_FUNC( HB_THREADSELF )
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( HB_THREADID )
|
||||
{
|
||||
#if defined( HB_MT_VM )
|
||||
PHB_THREADSTATE pThread = ( PHB_THREADSTATE ) hb_vmThreadState();
|
||||
if( pThread )
|
||||
hb_retnl( pThread->th_id );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( HB_THREADJOIN )
|
||||
{
|
||||
PHB_THREADSTATE pThread = hb_thParam( 1 );
|
||||
|
||||
Reference in New Issue
Block a user