Subject: Floating point in the kernel
To: None <>
From: Andreas Gustafsson <>
List: tech-kern
Date: 09/18/1998 15:25:37
I am trying to write a software modem, using NetBSD/i386 as the
development platform.  The code already mostly works as a user-mode
process, but the lack of real-time scheduling guarantees prevents it
from operating reliably when the system is under load.  Therefore, I
am trying to turn it into a loadable kernel module, hoping this will
help me achieve a low enough latency.

My problem is that when I do this, the kernel panics with 
"npxsave: masked".  My modem code relies heavily on floating point,
and apparently NetBSD/i386 does not fully support the use of floating
point in kernel code.

I know and understand that floating point should generally be avoided
in the kernel, but in a heavy-duty signal processing application like
this, there really is no alternative.  Also, I see that there already
exist a few pieces of floating point in obscure parts of the kernel
source tree (e.g., arch/x68k/dev/bsd_audio.c, netiso/clnp_frag.c).

So, I am wondering, is this lack of support for floating point in the
kernel on the i386 port

 a) considered a bug or a feature?
 b) fixable?
 c) affecting other NetBSD ports besides i386?
 d) affecting other modern Unix-like systems besides NetBSD?

Andreas Gustafsson,