Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel

Rene Herman
2008-07-19T07:51:58Z

On 19-07-08 00:16, Arjan van de Ven wrote:

> +static void __init do_initcalls(void)
> +{
> + initcall_t *call;
> + static DECLARE_WORK(async_work, do_async_initcalls);
> + int phase = 0; /* 0 = levels 0 - 6, 1 = level 6a, 2 = after level 6a */
> +
> + async_init_wq = create_singlethread_workqueue("kasyncinit");
> +
> + for (call = __initcall_start; call < __initcall_end; call++) {
> + if (phase == 0 && call >= __async_initcall_start) {
> + phase = 1;
> + queue_work(async_init_wq, &async_work);
> + }
> + if (phase == 1 && call >= __async_initcall_end)
> + phase = 2;
> + if (phase != 1)
> + do_one_initcall(*call);
> + }

I'm not sure about this comment, being not very sure about the semantics
of late_initcall but shouldn't late_initcall (level 7) wait for 6s to
have completed?

Rene.