| 1 | Linux Trace Toolkit |
| 2 | |
| 3 | Mathieu Desnoyers 18-05-2004 |
| 4 | |
| 5 | |
| 6 | Seeing that a very precise hook call ordering is needed when processing events |
| 7 | (especially the order for calling state update hooks and event delivery hooks), |
| 8 | this document defines a new type and interface that permits to merge all kind of |
| 9 | hooks, eventually sorted by the priority associated to them. |
| 10 | |
| 11 | - Type LttvHooks with priorities |
| 12 | |
| 13 | This is a modification to the actual LttvHooks that associates a priority with |
| 14 | each hook. The container for this type would be a garray, just like hook.c, but |
| 15 | a lttv_hooks_prio_sort would be called every time a hook is added to a list. It |
| 16 | would sort the hooks in a hook list by priority : from highest priority (-19) to |
| 17 | lowest (20). The default priority is 0. |
| 18 | |
| 19 | In order to make lttv_hooks_call aware of the different kind of hooks it has to |
| 20 | call, the LttvHooksById will be modified to integrate a new "main" list : a |
| 21 | pointer to a LttvHooks that will be called for any Id. |
| 22 | |
| 23 | A new lttv_hooks_by_id_call that will get the hooks from the main and by_id |
| 24 | lists in the right order will deal with the multiple lists priority problem. |
| 25 | |
| 26 | |
| 27 | |
| 28 | |