[RFC v7 02/21] um: add os init and exit calls

Johannes Berg johannes at sipsolutions.net
Wed Oct 7 11:13:02 EDT 2020


On Tue, 2020-10-06 at 18:44 +0900, Hajime Tazaki wrote:
> 
> -#define __define_initcall(level,fn) \
> -	static initcall_t __initcall_##fn __used \
> -	__attribute__((__section__(".initcall" level ".init"))) = fn
> -
> -/* Userspace initcalls shouldn't depend on anything in the kernel, so we'll
> - * make them run first.
> - */
> -#define __initcall(fn) __define_initcall("1", fn)
> +#undef __uml_exit_call
> +#define __uml_exit_call		__used __section(os_exitcalls)

Doesn't that break calling of sigio_cleanup and remove_umid_dir?

After all,

> +void __weak os_exitcalls(void)
> +{
> +}

This does nothing so far.

Also, why the __weak?

johannes




More information about the linux-um mailing list