Lines Matching refs:hook
36 /** Adds a hook to the specified list.
37 * If \a _lastHook is NULL, the hook will be added at the head of the list,
46 fork_hook *hook = (fork_hook *)malloc(sizeof(struct fork_hook));
47 if (hook == NULL)
50 hook->function = function;
53 // add hook at the end of the list
57 *_hooks = hook;
58 *_lastHook = hook;
63 // search for last hook (need if an item was added to the beginning only --
73 (*_lastHook)->next = hook;
74 *_lastHook = hook;
77 hook->next = NULL;
79 // add hook at the beginning of the list
80 hook->next = *_hooks;
81 *_hooks = hook;
92 call_fork_hooks(fork_hook *hook)
94 while (hook) {
95 hook->function();
96 hook = hook->next;