xref: /titanic_52/usr/src/man/man9f/ddi_get_kt_did.9f (revision c10c16dec587a0662068f6e2991c29ed3a9db943)
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 "15 May 2001" "SunOS 5.11" "Kernel Functions for Drivers"
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.