Module Name:    src
Committed By:   riastradh
Date:           Sat Jun 13 19:01:11 UTC 2020

Modified Files:
        src/sys/arch/x86/x86: fpu.c

Log Message:
Add comments over fpu_kern_enter/leave.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.63 src/sys/arch/x86/x86/fpu.c:1.64
--- src/sys/arch/x86/x86/fpu.c:1.63	Sat Jun 13 19:00:18 2020
+++ src/sys/arch/x86/x86/fpu.c	Sat Jun 13 19:01:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.63 2020/06/13 19:00:18 riastradh Exp $	*/
+/*	$NetBSD: fpu.c,v 1.64 2020/06/13 19:01:11 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.63 2020/06/13 19:00:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.64 2020/06/13 19:01:11 riastradh Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -343,6 +343,15 @@ fpu_lwp_abandon(struct lwp *l)
 
 /* -------------------------------------------------------------------------- */
 
+/*
+ * 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 @@ fpu_kern_enter(void)
 	clts();
 }
 
+/*
+ * fpu_kern_leave()
+ *
+ *	End using the FPU after fpu_kern_enter().
+ */
 void
 fpu_kern_leave(void)
 {

Reply via email to