This is a modification to the actual LttvHooks that associates a priority with
each hook. The container for this type would be a garray, just like hook.c, but
-a lttv_hooks_prio_sort would be called every time a hook is added to a list. It
-would sort the hooks in a hook list by priority : from highest priority (-19) to
-lowest (20). The default priority is 0.
+hooks would be added at the right position in the list, by priority. Hooks in a
+hook list are ordered by priority : from highest priority (0) to
+lowest (99). The default priority is 50 (defined as LTTV_PRIO_DEFAULT).
-In order to make lttv_hooks_call aware of the different kind of hooks it has to
-call, the LttvHooksById will be modified to integrate a new "main" list : a
-pointer to a LttvHooks that will be called for any Id.
-
-A new lttv_hooks_by_id_call that will get the hooks from the main and by_id
-lists in the right order will deal with the multiple lists priority problem.
+A new lttv_hooks_call_merge that will get the hooks from two hook lists in the
+right order will deal with the multiple lists priority problem.
priority higher than default. We will define this priority as PRIO_STATE,
defined to -10.
-If state has to be computed, lttv_process_traceset_begin is called to add state
-hooks to the context. Then, the state seek_closest will have to be used to
-restore the nearest state, plus a process_traceset with no hooks present other
-than the state hooks will have to be called to go from the closest state to the
-real time seeked.
+If state has to be computed, lttv_process_traceset_begin has to be called in
+a first time. It adds the state hooks to the context. Then, the state
+seek_closest will have to be used to restore the nearest state, plus a
+process_traceset with no hooks present other than the state hooks will have to
+be called to go from the closest state to the real time seeked.
The lttv_process_traceset_end will only need to be called if no further state
computation is needed.