[lkml]   [2004]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to use floating point in a module?
Måns Rullgård wrote:
> Floating point is forbidden in kernel code since the floating point
> registers (and other floating point context) is not saved/restored
> during system calls, for efficiency. I'm speculating here, but it
> might be possible to manually save the floating point context while
> doing some floating point operations. The problem arises if this code
> is interrupted midway. Using a preemptive 2.6 kernel would easily
> break here.

What about adding some functions such as enable_fpreg_syscalls() and
disable_fpreg_syscalls() that could be called before and after any floating
point operations? They could set a flag somewhere that would cause the
float registers to be saved/restored. Forgive me if this is somehow stupid.
I'm very much a kernel newbie.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [W:0.076 / U:2.784 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site