|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 5/7] include/essentials: Provide __constructor macro
On 01.06.2018 11:31, Sharan Santhanam wrote: On 05/30/2018 04:18 PM, Simon Kuenzer wrote:On 23.05.2018 15:00, Sharan Santhanam wrote:Hello Simon, Please find my comments in line. On 05/22/2018 02:20 PM, Simon Kuenzer wrote:The lvl parameter is an optional parameter. We are forcing the user to use constructor with priority as the default case. Is there any reason behind it? If the user is using __attribute__((constructor)) directly (without lvl), such functions will be called after the prioritized ones. Constructors with a priority level always called before the non-leveld ones. Would this avoid difficulties? /** * Mark a function as constructor * The compiler/linker will populate a function pointer * to the init_array section */ #ifndef __constructor #define __constructor __attribute__ ((constructor)) #endif /** * Mark a function as constructor with priority * The compiler/linker will populate a function pointer * (sorted by priority) to the init_array section * Prioritized constructors are called before * non-prioritized ones * * @param lvl * Priority level (101 (earliest)...onwards (latest)) */ #ifndef __constructorp #define __constructorp(lvl) __attribute__ ((constructor (lvl))) #endif + #else /* TO BE DEFINED */ #endif /* __GNUC__ */Thanks & Regards Sharan SanthanamThanks & Regards Sharan _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |