hal scripts cannot do INT32

Matthew Garrett mjg59 at srcf.ucam.org
Wed Jun 10 08:52:27 PDT 2009


On Wed, Jun 10, 2009 at 12:51:42PM +0200, Kay Sievers wrote:
> On Sun, Jun 7, 2009 at 13:35, <danny at mailmij.org> wrote:
> 
> > The first issue is a race condition. Apparently, on the moment the backlight device
> > is created, hal tries to read the maximum brightness. Even although there is only a
> > short code path between device creation and the set of the max brightness, apparently the
> > kernel gets preempted, and hal reads 0 from sysfs.
> 
> Are you sure, the sysfs file is already created that time or it possibly isn't?

You need to register a backlight in order to get a backlight structure, 
so you can't set max_brightness until after the creation uevent has 
occured. I'm amazed it works at all, to be honest - we seem to be lucky 
on x86.

> > I'm not sure if the plan is to remove all the shell scripts and move to C, or that everybody is sue 16 bits are enough even although the api specifies a 32 bit int.
> 
> We are currently moving away from HAL to DeviceKit, so any major
> changes in HAL seem unlikely. For new stuff DeviceKit-power,
> DeviceKit-disks should be focused on.

We're still using hal for backlight control, and this is something that 
really should be fixed. It should be easy enough to replace the scripts.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the hal mailing list