Lines Matching defs:state
12 #include "state.h"
15 #define klp_for_each_state(patch, state) \
16 for (state = patch->states; state && state->id; state++)
19 * klp_get_state() - get information about system state modified by
21 * @patch: livepatch that modifies the given system state
22 * @id: custom identifier of the modified system state
24 * Checks whether the given patch modifies the given system state.
33 struct klp_state *state;
35 klp_for_each_state(patch, state) {
36 if (state->id == id)
37 return state;
45 * klp_get_prev_state() - get information about system state modified by
47 * @id: custom identifier of the modified system state
50 * system state.
52 * The same system state can be modified by more non-cumulative
67 struct klp_state *state, *last_state = NULL;
76 state = klp_get_state(patch, id);
77 if (state)
78 last_state = state;
86 /* Check if the patch is able to deal with the existing system state. */
90 struct klp_state *state;
92 state = klp_get_state(patch, old_state->id);
95 if (!state)
98 return state->version >= old_state->version;