|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 5/8] plat/linuxu: Introduce heap size as a lib parameter
On 4/10/19 4:09 PM, Florian Schmidt wrote: Since it was a base platform library, I did not want to include extra libraries. But for other internal libraries I would expect the Config.uk to contain "select LIBUKLIBPARAM". So you do not have to use the ifdef.Hi Sharan,the idea of the patch looks fine, but I'm not a big fan of strewing #ifdef CONFIG_* all over the code. What if, instead of checking the config parameter everywhere, there were one big #ifdef CONFIG_LIBUKLIBPARAM in libparam.h, which defines everything as it is now if it is defined, and in the #else case defines the public-facing macros such as UK_LIB_PARAM() as empty macros? That way, you don't need to #ifdef-guard all those calls inside the code. My only concern with this solution is, if the developer misconfigures the error would be caught while running the program as we are silently ignoring the parameter. In the current implementation it would cause compiler error and cannot be ignored.Of course, that means the build system needs to provide the include path to libparam.h even if the library itself isn't compiled in, but this could be just done by setting the include directive in libparam's Makefile.uk to be CINCLUDES-y instead of CINCLUDES-$(CONFIG_LIBUKLIBPARAM), but maybe this unconditional addition to the include directories is worth less #ifdef pollution in each source file. Cheers, Florian On 3/15/19 6:06 PM, Sharan Santhanam wrote: _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |