Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017



ddi_get_kt_did - get identifier of current thread


#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)


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


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


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 purposes.