Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/arch/x86/x86 Add comments over fpu_kern_enter/leave.



details:   https://anonhg.NetBSD.org/src-all/rev/ef6d101dfa51
branches:  trunk
changeset: 934510:ef6d101dfa51
user:      Taylor R Campbell <riastradh%NetBSD.org@localhost>
date:      Thu Jun 04 03:33:24 2020 +0000

description:
Add comments over fpu_kern_enter/leave.

diffstat:

 sys/arch/x86/x86/fpu.c |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 7c7dd9d11375 -r ef6d101dfa51 sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c    Thu Jun 04 03:30:18 2020 +0000
+++ b/sys/arch/x86/x86/fpu.c    Thu Jun 04 03:33:24 2020 +0000
@@ -343,6 +343,15 @@
 
 /* -------------------------------------------------------------------------- */
 
+/*
+ * fpu_kern_enter()
+ *
+ *     Begin using the FPU.  Raises to splhigh, disabling all
+ *     interrupts and rendering the thread non-preemptible; caller
+ *     should not use this for long periods of time, and must call
+ *     fpu_kern_leave() afterward.  Non-recursive -- you cannot call
+ *     fpu_kern_enter() again without calling fpu_kern_leave() first.
+ */
 void
 fpu_kern_enter(void)
 {
@@ -375,6 +384,11 @@
        clts();
 }
 
+/*
+ * fpu_kern_leave()
+ *
+ *     End using the FPU after fpu_kern_enter().
+ */
 void
 fpu_kern_leave(void)
 {



Home | Main Index | Thread Index | Old Index