xref: /titanic_44/usr/src/man/man9f/ddi_get_kt_did.9f (revision f05d7fc81533be643136e12ce92516d1d4292921)
te
Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
DDI_GET_KT_DID 9F "May 15, 2001"
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 identifier 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 purposes.