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:
Maurilio Longo
2008-10-02 13:47:59 +00:00
parent 3271afe446
commit c2f6b15424
2 changed files with 503 additions and 489 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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 );