ADHD: Facilitate sorting of linker sets

Details

  It is desirable to have an ordering applied to the threads in gavd.
  One reason for this might be to ensure that the audio system is set
  to the factory default at power-on, or to ensure that a 'work list'
  management system is ready-to-use before any other threads are
  instantiated.

  To be able to provide priority to threads during startup, we need to
  be able to order the set of thread descriptors, which is a linker
  set.

  This change adds better comments to the linker set interface, and
  adds 'LINKERSET_SORT'.

  To add this functionality, LINKERSET_ADD_ITEM had to be changed to
  remove the const-ness on the data; without this removal, the
  linker set is put into R/O memory.

Testing

  Built chromiumos for tegra2_aebl
  Built chromiumos for x86-mario (compilation only, gavd is a nop on x86)

  Booted on tegra2_aebl, observed that the daemon runs correctly.

BUG=chromium-os:19558
TEST=See above.

Change-Id: Id119e4ad9392a1db7e1f943e341c5b0558cb8f77
Signed-off-by: Taylor Hutt <thutt@chromium.org>
1 file changed