Newsgroups: comp.os.parix
From: vdlinden@fwi.uva.nl (Frank van der Linden)
Subject: Re: Thread ID ?
Organization: FWI, University of Amsterdam
Date: 8 Nov 1994 08:26:08 GMT
Message-ID: <39ncn0$n3h@mail.fwi.uva.nl>

jim@ariel.ti2.tu-harburg.de (Juergen W. Meyer) writes:

>Hi netters,

>does anyone know, if it there exists something like a tread ID or
>a simple thread number when using Parix? It is easy to find out
>on which processor a tread is running, but I need to know which
>of one processor's threads is calling a global function.

If you are using Parix 1.2-PPC, you can use the GetGlobId function, this
will give you a structure containing node, context and thread number.
See the manual page of GetGlobId for more info, and the <sys/thread.h>
include file for a definition of GlobId_t (a typedef for that structure).

I don't think that there is a documented way to do that on Parix 1.2-T8,
the only thing you have there is GetThreadPtr(), which gives a pointer
to the current thread structure. But this may not be of much help, and
it isn't supported in Parix 1.2-PPC anymore anyway. There must be some
way to do it on a T8, since LogError knows all the right numbers, according
to the messages, but it must be fairly obscure ;-)

- Frank
-- 
+----------------------------------------------------------------------------+
| I am not sure what a .signature is for, but my mom told me to make one.    |
| Frank van der Linden, vdlinden@fwi.uva.nl                                  |
+----------------------------------------------------------------------------+

