search for: state_enum

Displaying 9 results from an estimated 9 matches for "state_enum".

2019 Jun 05
0
[PATCH libnbd 3/4] lib: Add set_state / get_state macros.
...6 files changed, 29 insertions(+), 26 deletions(-) diff --git a/generator/generator b/generator/generator index 8ed0a06..a3fbea9 100755 --- a/generator/generator +++ b/generator/generator @@ -2415,11 +2415,11 @@ let generate_lib_states_c () = pr " enum state next_state = %s;\n" state_enum; pr "\n"; pr " r = _enter_%s (h, &next_state, blocked);\n" state_enum; - pr " if (h->state != next_state) {\n"; + pr " if (get_state (h) != next_state) {\n"; pr " debug (h, \"transition: %%s -> %%s\&quo...
2019 Jun 05
0
[PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...6 files changed, 38 insertions(+), 24 deletions(-) diff --git a/generator/generator b/generator/generator index a3fbea9..d198007 100755 --- a/generator/generator +++ b/generator/generator @@ -2415,11 +2415,11 @@ let generate_lib_states_c () = pr " enum state next_state = %s;\n" state_enum; pr "\n"; pr " r = _enter_%s (h, &next_state, blocked);\n" state_enum; - pr " if (get_state (h) != next_state) {\n"; + pr " if (get_next_state (h) != next_state) {\n"; pr " debug (h, \"transition: %%s -> %...
2019 Jun 08
0
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
...ch {b only} read from the atomic + * [get_public_state] and do nothing else with the handle. *) is_locked : bool; (* Most functions can call set_error. For functions which are @@ -2449,11 +2450,11 @@ let generate_lib_states_c () = pr " enum state next_state = %s;\n" state_enum; pr "\n"; pr " r = _enter_%s (h, &next_state, blocked);\n" state_enum; - pr " if (get_state (h) != next_state) {\n"; + pr " if (get_next_state (h) != next_state) {\n"; pr " debug (h, \"transition: %%s -> %...
2019 Jun 05
1
[PATCH libnbd v2] lib: Atomically update h->state when leaving the locked region.
...nly} reads from the atomic + * [get_public_state] field and does nothing else with the handle. *) is_locked : bool; (* Most functions can call set_error. For functions which are @@ -2418,11 +2418,11 @@ let generate_lib_states_c () = pr " enum state next_state = %s;\n" state_enum; pr "\n"; pr " r = _enter_%s (h, &next_state, blocked);\n" state_enum; - pr " if (get_state (h) != next_state) {\n"; + pr " if (get_next_state (h) != next_state) {\n"; pr " debug (h, \"transition: %%s -> %...
2019 Jun 05
9
[PATCH libnbd 0/4] lib: Atomically update h->state.
I need to think about this patch series a bit more, but it does at least pass the tests. Rich.
2019 Jun 08
4
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00055 v2 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00067 v3: - Fix atomicly -> atomically in commit message. - Fix a comment. - Fix TOCTTOU: There is now an inline function generated called <name>_is_permitted_state, and this is called twice, first outside the
2023 Jun 12
1
[PATCH libnbd 2/2] generator: state machine: Be less verbose in debug messages
...t; }\n"; > pr " return r;\n"; > @@ -423,15 +420,6 @@ let > pr " case %s:\n" (c_string_of_external_event e); > if state != next_state then ( > pr " set_next_state (h, %s);\n" next_state.parsed.state_enum; > - pr " debug ("; > - let print_debug_args () = > - pr "h, \"event %%s: %%s -> %%s\", "; > - pr "\"%s\", \"%s\", \"%s\");" > - (st...
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must
2023 Jun 12
3
[PATCH libnbd 0/2] Two simple patches
These patches aren't related to each other, but both are quite simple. The second one requires particular attention - it's my experience that printing out the state transitions in debug mode has never helped me to diagnose a bug, but it has made the debug logs huge and hard to follow. However that might just be me! Has it helped anyone else? Also I'm open to the concept of debug