Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man9f/ddi_enter_critical.9f
Real path: /usr/share/man/man9f/ddi_enter_critical.9f
Zurück
'\" te .\" Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. .TH ddi_enter_critical 9F "16 Jan 2006" "Oracle Solaris 11.4" "Kernel Functions" .SH NAME ddi_enter_critical, ddi_exit_critical \- enter and exit a critical region of control .SH SYNOPSIS .LP .nf #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> \fBunsigned int\fR \fBddi_enter_critical\fR(\fBvoid\fR); .fi .LP .nf \fBvoid\fR \fBddi_exit_critical\fR(\fBunsignedint\fR \fIddic\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIddic\fR\fR .ad .RS 8n .rt The returned value from the call to \fBddi_enter_critical()\fR must be passed to \fBddi_exit_critical()\fR. .RE .SH DESCRIPTION .sp .LP Nearly all driver operations can be done without any special synchronization and protection mechanisms beyond those provided by, for example, mutexes (see \fBmutex\fR(9F)). However, for certain devices there can exist a very short critical region of code which \fBmust\fR be allowed to run uninterrupted. The function \fBddi_enter_critical()\fR provides a mechanism by which a driver can ask the system to guarantee to the best of its ability that the current thread of execution will neither be preempted nor interrupted. This stays in effect until a bracketing call to \fBddi_exit_critical()\fR is made (with an argument which was the returned value from \fBddi_enter_critical()\fR). .sp .LP The driver may not call any functions external to itself in between the time it calls \fBddi_enter_critical()\fR and the time it calls \fBddi_exit_critical()\fR. .SH RETURN VALUES .sp .LP The \fBddi_enter_critical()\fR function returns an opaque unsigned integer which must be used in the subsequent call to \fBddi_exit_critical()\fR. .SH CONTEXT .sp .LP This function can be called from user, interrupt, or kernel context. .SH WARNINGS .sp .LP Driver writers should note that in a multiple processor system this function does not temporarily suspend other processors from executing. This function also cannot guarantee to actually block the hardware from doing such things as interrupt acknowledge cycles. What it \fBcan\fR do is guarantee that the currently executing thread will not be preempted. .sp .LP Do not write code bracketed by \fBddi_enter_critical()\fR and \fBddi_exit_critical()\fR that can get caught in an infinite loop, as the machine may crash if you do. .SH SEE ALSO .sp .LP \fBmutex\fR(9F) .sp .LP \fIWriting Device Drivers in Oracle Solaris 11.4\fR