Newsgroups: comp.os.parix
From: bieker@sylt.iti.mu-luebeck.de (Bernd Bieker)
Subject: Re: Thread ID ?
Organization: Inst. f. Med. Informatik, Med. Univ. Luebeck
Date: 20 Sep 1995 14:20:58 GMT
Message-ID: <43p80a$q36@gwsun.medinf.mu-luebeck.de>

In article <43mkv6$ejo@gnu.mat.uc.pt>, nunov@pandora.uc.pt writes:
|> Hi!
|> 
|> 
|> I have a function that is called by different threads
|> and I need to know inside that function which was the
|> caller thread.
|> I was using GetThreadPtr () to solve the problem.
|> GetThreadPtr () is an undocumented function in Parix
|> Release 1.2 that is no longer supported in Parix Rel.
|> 1.3-PPC.
|> Is there a way to get a thread ID by using only
|> documented functions ?
|> 
|> Thanks!
|> 
You can use the parix function

	  int  GetGlobId (GlobId_t *GlobId, Thread_t *Tptr)

When handing in NULL as Tptr the calling thread's pointer is used.

Greetings

Bernd

--------------------------------------------------------------------------------

     ----
    /    /  ----      Bernd Bieker                    
   /____/  /    /                                     
  /    /  /____/      Medizinische Universitaet zu Luebeck 
 /    /  /    /       Institut fuer Technische Informatik 
 ----   /    /        Ratzeburger Allee 160 
	----
		      D-23538 Luebeck
		      Germany

		      Tel.: +49 451 500-3692
		      Fax:  +49 451 500-3687
		      Email: bieker@iti.mu-luebeck.de
--------------------------------------------------------------------------------

