[PATCH] Wait for hald during initialization when necessary

Yan Li elliot.li.tech at gmail.com
Wed Jan 21 22:01:31 PST 2009


On Wed, Jan 21, 2009 at 11:41:17PM +1100, Peter Hutterer wrote:
> On Wed, Jan 21, 2009 at 06:09:48PM +0800, Yan Li wrote:
> > hald might not be ready when we need it, wait for it for a few seconds
> > +	    LogMessage(X_INFO, "config/hal: waiting for hald...\n");
> > +	    usleep (wait_for_hal_sleep_time);
> > +	    wait_for_hal -= wait_for_hal_sleep_time;

> I think it'd be better to set a timer to fire off the reinitialization rather
> than a simple usleep. Doing so allows us to finish the server initialization
> without having to wait for hal. Any opinions?

Yeah, this is better. Setting a timer and let the main thread carry
on. Theoretically by this we can save another 140ms during boot, which
is very enticing since the current start time of xserver is around 1
second.

-- 
Li, Yan



More information about the xorg mailing list