proc_ref(D3) proc_ref(D3)
NAME
proc_ref - obtain a reference to a process for signaling
SYNOPSIS
#include <sys/signal.h>
#include <sys/ddi.h>
void *proc_ref(void);
DESCRIPTION
A non-STREAMS character driver can call proc_ref to obtain a
reference to the process in whose context it is running.
Return Values
proc_ref returns an identifier that can be used in calls to
proc_signal and proc_unref(D3).
USAGE
The value returned can be used in subsequent calls to
proc_signal(D3) to post a signal to the process. The return
value should not be used in any other way (that is, the driver
should not attempt to interpret its meaning).
Processes can exit even though they are referenced by drivers.
In this event, reuse of the identifier will be deferred until
all driver references are given up.
There must be a matching call to proc_unref for every call to
proc_ref, when the driver no longer needs to reference the
process. This is typically done as part of close(D2)
processing.
This function requires user context.
Level
Base only.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
proc_signal(D3), proc_unref(D3), proc_valid(D3)
Copyright 1994 Novell, Inc. Page 1
proc_ref(D3) proc_ref(D3)
NOTICES
Portability
All processors
Applicability
ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2