mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-21 16:39:39 +00:00
libc: late intialization of plugins
- for-each plugin iterator * Call 'init(Genode::env &)' for each plugin bofore 'Libc::construct' or 'main' is called
This commit is contained in:
committed by
Norman Feske
parent
549c6db064
commit
643a09b518
@ -46,6 +46,15 @@ struct Libc::Plugin_registry : List<Plugin>
|
||||
Plugin *get_plugin_for_stat(const char *path, struct stat *);
|
||||
Plugin *get_plugin_for_symlink(const char *oldpath, const char *newpath);
|
||||
Plugin *get_plugin_for_unlink(const char *path);
|
||||
|
||||
template <typename FUNC>
|
||||
void for_each_plugin(FUNC const &fn) const
|
||||
{
|
||||
for (Plugin *plugin = plugin_registry()->first(); plugin;
|
||||
plugin = plugin->next()) {
|
||||
fn(*plugin);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _LIBC_PLUGIN__PLUGIN_REGISTRY_H_ */
|
||||
|
Reference in New Issue
Block a user