[OpenAFS-devel] tracking lockers on Solaris

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Fri, 05 Jan 2007 07:09:32 -0500


In message <Pine.GSO.4.61-042.0701042337110.969@johnstown.andrew.cmu.edu>,Derrick J Brashear writes:
>> so perhaps curthread->t_did?
>
>Tom Keiser suggested t_tid.

curthread->t_did is used in the solaris kernels as:

NAME
     ddi_get_kt_did - get identifier of current thread

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ddi.h>
     #include <sys/sunddi.h>

     kt_did_t ddi_get_kt_did(void);

INTERFACE LEVEL
     Solaris DDI specific (Solaris DDI)

DESCRIPTION
     The ddi_get_kt_did() function returns a unique 64-bit  iden-
     tifier for the currently running thread.

CONTEXT
     This routine can be called from user, kernel,  or  interrupt
     context.  This  routine  cannot  be called from a high-level
     interrupt context.

RETURN VALUES
     ddi_get_kt_did()  always  returns  the  identifier  for  the
     current thread. There are no error conditions.

SEE ALSO
     Writing Device Drivers

NOTES
     The value returned by this function can also be seen in  adb
     or  mdb  as  the  did  field displayed when using the thread
     macro.

     This interface is intended for tracing  and  debugging  pur-
     poses.