[patch] Add advisory locks to HAL devices

Joe Shaw joeshaw at novell.com
Fri Sep 10 10:43:04 PDT 2004


Hi,

I took a stab at implementing the advisory locks, as mentioned in the
TODO and referenced in this thread:

	http://freedesktop.org/pipermail/hal/2004-July/000579.html

This patch adds the infrastructure for the locks, but they're not yet
used anywhere (like not polling a CD recorder while it's burning, for
instance).  It adds Lock and Unlock methods to libhal, which trigger
certain properties being set in hald.  hald indicates that it's locked
with the "info.locked" property and sets "info.locked.dbus_service" to
indicate who took the lock and "info.locked.reason" to a user-visible
string as to why it is locked.  hald tracks the lifecycle of the service
in "info.locked.dbus_service" and releases the lock if it is deleted
before it voluntarily unlocks the device.

Check it out, let me know what you think.

Thanks,
Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-lock.patch
Type: text/x-patch
Size: 15306 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20040910/503458b9/hal-lock.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list