Wed, 19 Jul 2000 �⺮ wrote:
> If I donot use asin() and sqrt(), the errors disappear. Strangely, it is ok
> to use sin(), it really made me at a loss. I guess maybe it is because I did
> not insmod rtl_fpsched.o first, but rtlinux1.1.tgz did not provide it.

In general, these functions are it the standard math library libm, so you have
to link that in as well. However, I'm not sure which functions are safe to use
in kernel space... Those that use the standard math error handling code will
cause the module not to load, as they try to fprintf(stderr,...) and the like.

As to sin() working, this is probably because it's just a macro that generates a
few FPU instructions. No special error handling needed, as there aren't any
illegal input values for sin(). (Except for NaNs and the like of course, but
those are handled automatically through exceptions/signals from either the FPU
emulation or hardware FPU, AFAIK.)

Some things to try:

* Look for an RTL compatible math lib or module that provides the functions you
  need.

* Copy the libm function you need and rip out or port the error handling code
  that causes it not to load into kernel space. (fprintf() and the like.)

* Hack your own macros that generate FPU asm code directly. Probably not as
  trivial as it may seem though, at least not if you want to stick to the
  standard rounding and other stuff to be 100% libm compatible.


David Olofson
 Programmer
 Reologica Instruments AB
 [EMAIL PROTECTED]

..- M u C o S --------------------------------. .- David Olofson ------.
|           A Free/Open Multimedia           | |     Audio Hacker     |
|      Plugin and Integration Standard       | |    Linux Advocate    |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
..- A u d i a l i t y ------------------------. |        Singer        |
|  Rock Solid Low Latency Signal Processing  | |      Songwriter      |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to