site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Fri, 6 Jun 2008, Michael T??xen wrote: Dear all, in an NKE I'm using code like TAILQ_FOREACH(ifn, &ifnet, if_list) { /* Do something with ifn */ } and need to protect it by ifnet_head_lock_shared(); TAILQ_FOREACH(ifn, &ifnet, if_list) { /* Do something with ifn */ } ifnet_head_done(); but the kextload reports kld(): Undefined symbols: _ifnet_head_done _ifnet_head_lock_shared As OSBundleLibraries I use com.apple.kernel. I do know that I'm using unsupported API... but is there a way to use the mutex routines? To the best of my knowledge, you can't link to those routines, because they aren't in the mach_kernel's symbol table. However, so long as you abide by the terms of the APSL, you can crib them from the sources and put them in your Kext. (I'm assuming you already understand the risks associated with doing this, such as "Apple could change them for any release and you code will then be broken".) If you download xnu-1228 sources, look in bsd/net/dlil.c for them. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com rick
participants (1)
-
Rick Macklem