[M3devel] how to switch between user and kernel threads..
Jay
jay.krell at cornell.edu
Wed Jan 14 10:14:19 CET 2009
Are people really against using function pointers for this?
Either changing the interface to have function pointer variables (I'm not sure Modula-3 allows this, but in C you can fairly transparently replace functions with function pointers; client code just keeps working; it breaks down in C++ with overloading), or having a set of functions that just call/jump through function pointers? There would be no if, no conditional branches.
Dynamic linking on Windows always goes through function pointers already.
So while yes it adds another instruction, it is already never getting inlined.
Don't other platforms do that too?
Or they patch every call site?
I'm not sure otherwise of a simple method.
Easiest might be to have a parallel directory structure to m3core, with just m3core files.
That would wastefully rebuild all of m3core a second time, for just a small amount of variation.
I think function pointers are the way to go here.
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090114/f12b5a9e/attachment-0001.html>
More information about the M3devel
mailing list