From 4e6bbdd6feef36a74cdabe03f37c396b739bd7ec Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 7 Mar 2018 18:31:31 +0000 Subject: [PATCH] fpu_kern.9: Document fpu_kern_enter API change in r329878 While here, clean up some of the language. Reported by: delphij Sponsored by: Dell EMC Isilon --- share/man/man9/fpu_kern.9 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/share/man/man9/fpu_kern.9 b/share/man/man9/fpu_kern.9 index 2651e12a2b49..8fcf82605af2 100644 --- a/share/man/man9/fpu_kern.9 +++ b/share/man/man9/fpu_kern.9 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2016 +.Dd March 7, 2018 .Dt FPU_KERN 9 .Os .Sh NAME @@ -34,7 +34,7 @@ .Fn fpu_kern_alloc_ctx "u_int flags" .Ft void .Fn fpu_kern_free_ctx "struct fpu_kern_ctx *ctx" -.Ft int +.Ft void .Fn fpu_kern_enter "struct thread *td" "struct fpu_kern_ctx *ctx" "u_int flags" .Ft int .Fn fpu_kern_leave "struct thread *td" "struct fpu_kern_ctx *ctx" @@ -139,19 +139,15 @@ after the function returns, as well as after each context switch. On i386 and amd64 this will be the .Nm Device Not Available exception (see Intel Software Developer Manual for the reference). -Currently, no errors are defined which can be returned by -.Fn fpu_kern_enter -to the caller. .Pp The .Fn fpu_kern_leave function ends the region started by .Fn fpu_kern_enter . -The uses of FPU in the kernel after the call to -.Fn fpu_kern_leave -are erroneous until the next call to +It is erroneous to use the FPU in the kernel before .Fn fpu_kern_enter -is performed. +or after +.Fn fpu_kern_leave . The function takes the .Fa td thread argument, which currently must be @@ -161,9 +157,9 @@ and the context pointer, previously passed to .Fn fpu_kern_enter . After the function returns, the context may be freed or reused -by other invocation of +by another invocation of .Fn fpu_kern_enter . -There are no errors defined for the function, it always returns 0. +The function always returns 0. .Pp The .Fn fpu_kern_thread @@ -210,3 +206,9 @@ facitily and this manual page were written by .An Konstantin Belousov Aq Mt kib@FreeBSD.org . The arm64 support was added by .An Andrew Turner Aq Mt andrew@FreeBSD.org . +.Sh BUGS +.Fn fpu_kern_leave +should probably have type +.Ft void +(like +.Fn fpu_kern_enter ) .