lp:~sforshee/+junk/powerd-worker

Created by Seth Forshee and last modified
Get this branch:
bzr branch lp:~sforshee/+junk/powerd-worker
Only Seth Forshee can upload to this branch. If you are Seth Forshee please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
Seth Forshee
Status:
Development

Recent revisions

33. By Seth Forshee

power-request: Remove use of mutex protecting request hash table

Use powerd_run_mainloop_sync() to ensure all accesses to the
hash table occur on the main loop, eliminating the need to
protect access to the table with a mutex.

32. By Seth Forshee

Add utility for synchronously running a function on the main loop

In order to reduce the need for locking, we always want to run
certain tasks on the main loop. Sometimes it's necessary to
initiate these tasks from another thread, however we'd still like
to block until the task completes.

Add powerd_run_mainloop_sync() to assist with doing this action.
This function runs the the requested function on the main loop.
If currently executing on the main loop the function is executed
inline. Otherwise it is scheduled to run on the main loop and
powerd_run_mainloop_sync() blocks until the operation completes.
A new function power_is_mainloop() is also added to help with
determining if the current function is executing on the main
loop.

31. By Seth Forshee

power-request: Slight efficiency improvement to UUID hashing function

a ^ 0 == a. Therefore, when calculating the UUID hash we can
save a small chunk of time by initializing the hash to the first
element of the data rather than initializing it to 0 and xoring
it with the first element.

30. By Seth Forshee

power-request: Fix use-after-free bug

g_hash_table_remove() frees the memory, so save off the data
we need to use after calling it.

29. By Seth Forshee

Merge with trunk

28. By Seth Forshee

Use a hash table rather than a linked list for storing system state requests

This will scale better to larger numbers of requests.

27. By Seth Forshee

Improve dbus error handling

Fix several problems with dbus error handling. Modify the
internal request functions to no longer take an invocation;
instead, perform all error indication in the dbus callbacks.

26. By Seth Forshee

Update changelog

25. By Seth Forshee

Add test of invalidly formatted cookie

24. By Seth Forshee

Incorporate feedback from mfisch's review

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers