Re: Linking to standard libs in building a KEXT
Re: Linking to standard libs in building a KEXT
- Subject: Re: Linking to standard libs in building a KEXT
- From: "Sean Morrell" <email@hidden>
- Date: Fri, 29 Mar 2002 00:01:44 -0800
email@hidden writes:
>
>
Am Donnerstag den, 28. Mdrz 2002, um 09:51, schrieb Sean Morrell:
>
>
> I would like to use some of the functions provided by the standard c or
>
> c++ library from a KEXT. Is this possible? For instance, I would like
>
> to
>
> use sin to debug some problems in my audio driver.
>
>
That's rather sinful... but anyway, perhaps because of my 'age', I would
>
immediately assume the libc functions are not reentrant, hence would
>
cause problems in the kernel. Even if there were 'thread' safe versions,
>
I would probably extract those functions out of the libc sources, and
>
compile them with 'my_driver_sin', etc. renaming, given that many libc
>
functions often drag in other functions which may eventually drag
>
in far more, and both useless and not remotely 'kernel' functions.
>
(Heck, I've not looked, but does the kernel printf even support
>
floats...)
If IOLog uses printf, then no it doesn't support floats, or %f anyway.
Ah ... reentrancy. Thanks for the reminder. Though I don't think it
would be an issue here. I only need the user space lib for testing. And
only a single thread would be calling sin, any routines called by sin, or
the entire user space library. Anyway, I just created a makeshift sin
function using a small sine table. It will do for testing.
Thanks
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.