Jeff Squyres, le Wed 05 Sep 2012 17:06:00 +0200, a écrit :
> On Sep 5, 2012, at 10:21 AM, Samuel Thibault wrote:
>
> > So ltdl does not help for that matter?
>
> No. It's not really an ltdl issue. ltdl is just a portable wrapper around OS-specific dlopen-like mechanisms.
I understand that, but dlopen is usually used for plugins, and plugins
usually need such kind of calling back into what loaded the plugin.
> > One way would be to pass to the component a structure with all the
> > useful function pointers (using #define to keep the same source code).
>
> We thought about this in OMPI and decided it would be a nightmare in the source code.
The source code shouldn't need to be modified:
#define hwloc_foo_bar(arg1, arg2) hwloc_funcs->foo_bar(arg1, arg2)
Samuel
|