xref: /titanic_44/usr/src/man/man9f/ddi_get_pid.9f (revision 91d554cb0f648ab67fd0032d683cb4a4ec2d7bf4)
te
Copyright (c) 2000, 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_pid 9F "18 Feb 1998" "SunOS 5.11" "Kernel Functions for Drivers"
NAME
ddi_get_pid - returns the process ID
SYNOPSIS

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



pid_t ddi_get_pid(void);
INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).

DESCRIPTION

ddi_get_pid() obtains the process ID of the current process. This value can be used to allow only a select process to perform a certain operation. It can also be used to determine whether a device context belongs to the current process.

RETURN VALUES

ddi_get_pid() returns the process ID.

CONTEXT

This routine can be called from user context only.

SEE ALSO

drv_getparm(9F)

Writing Device Drivers

STREAMS Programming Guide