I am discovering the world of kernel extensions and using Project Builder. I have some quick questions that I hope someone can easily answer. 1 - In documentation I've been looking at it indicates class methods should be declared static. It seems to imply this is for performance reasons. However, in playing with it, it seems as if methods have to be static period. I say this because my extension fails loading due to undefined symbol problems if I don't declare all methods static. Maybe I just haven't investigated this enough. It is interesting that if I include methods in a struct, I don't have to declare them as static. Perhaps that is a given. I don't think a struct can be sub-structed, like a class can be sub-classed, but maybe I'm ignorant about that. 2 - I would like to use exceptions. PB tells me when I try to build that I need to use -fexceptions because exceptions are disabled. I tried adding that to the "Other Compiler Flags" section of the GCC compiler settings for the target. That didn't help. The docs show usage of -fhandle-exceptions, but I believe that is deprecated in favor of -fexceptions. In any case, it says I'm supposed to link against System.framework to use those. Can I do that? It appears that I can only link against Kernel.framework or particular modules within it for a kernel extension. I also find it strange that many standard ANSI functions, like memcmp(), are unavailable for use in kernel extensions. I don't understand the reasoning behind that. Can I even use things like the new and delete operators? I'm just trying to gain some perspective on this. It looks like C++ compilation is supported in a kernel extension, but in practice it is almost like being limited to C functionality for the most part. I am I off-track? Thanks for anyone's help! Eric Long ___________________________________________________________________________ Macintosh Software Engineer Aladdin Systems, Inc. http://www.aladdinsys.com 245 Westridge Drive, Watsonville, CA 95076 (831) 761-6200 x628 _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Eric Long