site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jun 16, 2006, at 12:54 PM, Andrew Gallatin wrote: That way, drivers wouldn't have to leave their object modules, they could just jump into their own private copies of the functions they would otherwise have called... Brilliant. = Mike _______________________________________________ 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... I'm talking about a scheme where, when the module is loaded, its code is re-written by the "kernel linker" (or kextload, or whatever does the relocation when loading a kext) and re-writes KPI functions to do direct structure access. This re-writing code is kernel dependent and could be supplied, for example, via the commpage. This would be similar to what Digital UNIX did when they patched out SMP locks at runtime on UP systems. That's a really innovative scheme... you could have little patch areas that you rewrote all the KPI functions into - and in fact you could optimise it by copying directly from the KPI function implementation in the kernel. (Yes, I am well aware of the point you're trying to make. In a few cases it might actually be useful, but vtable-style indirection isn't the big evil here...) This email sent to site_archiver@lists.apple.com