.TH drv_setparm() "" "" "DDI/DKI Kernel Routine"
.PC "Set an internal kernel variable"
.B "#include <sys/types.h>"
.B "#include <sys/ddi.h>"
\fBint drv_setparm(\fIaction\^\fB, \fIvalue\^\fB)\fR
\fBulong_t \fIaction\^\fB, \fIvalue\^\fB;\fR
.PP
.B drv_setparm()
uses
.I action
to modify an internal-kernel variable by
.IR value .
If all goes well, it returns zero; otherwise (e.g., because
the user lacks permission to modify
.IR variable )
it returns \-1.
.PP
.I action
can be one of the following:
.IP \fBSYSCANC\fR 1.0i
Add
.I value
to the count of characters read from a terminal device.
Exclude special characters, such as
.B break
or
.BR backspace .
.IP \fBSYSMINT\fR
Add
.I value
to the count of modem interrupts received.
.IP \fBSYSOUTC\fR
Add
.I value
to the count of characters written to a terminal device.
.IP \fBSYSRAWC\fR
Add
.I value
to the count of characters read from a terminal device.
Do not exclude special characters.
.IP \fBSYSRINT\fR
Add
.I value
to the count of interrupts generated by data to be
received from a terminal device.
.IP \fBSYSXINT\fR
Add
.I value
to the count of interrupts generated by data to be
transmitted to a terminal device.
.PP
.B drv_setparm()
returns zero if all goes well; otherwise, it returns \-1.
.SH "See Also"
.B
DDI/DKI kernel routines,
drv_getparm()
.R
.SH Notes
.B drv_setparm()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, a read/write lock, or a sleep lock
across calls to this function.
