Damien Zammit, le dim. 29 mars 2020 23:19:28 +1100, a ecrit:
> I created a ds_pre_server() hook in libmachdev and implemented it for
> libmachdevdde,
> and left an empty stub for libmachdevrump.
I don't see why making it a hook:
+void ds_pre_server(void)
+{
+ /* empty */
+}
+
+int main()
+{
+ register_block ();
+ mach_device_init ();
+ trivfs_init ();
+ cthread_detach (cthread_fork (ds_server, NULL));
+ trivfs_server ();
+ return 0;
+}
could be made into
+void rump_ds_server(void)
+{
+ ds_server();
+}
+
+int main()
+{
+ register_block ();
+ mach_device_init ();
+ trivfs_init ();
+ cthread_detach (cthread_fork (rump_ds_server, NULL));
+ trivfs_server ();
+ return 0;
+}
and similarly for DDE, provide a dde_ds_server, that dde translators can
use instead of ds_server.
For libmachdevrump, we want to enable its build only when librump is
available, that should be tested in configure.ac, just like we do for
libpciaccess and we enable pci-arbiter accordingly.
Samuel