Displaying 4 results from an estimated 4 matches for "9595269c".
2020 Feb 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
...nfig. */
lock_init_thread_model ();
@@ -660,8 +660,8 @@ main (int argc, char *argv[])
start_serving ();
- backend->free (backend);
- backend = NULL;
+ top->free (top);
+ top = NULL;
free (unixsocket);
free (pidfile);
diff --git a/server/plugins.c b/server/plugins.c
index 9595269c..16b4099b 100644
--- a/server/plugins.c
+++ b/server/plugins.c
@@ -144,7 +144,7 @@ plugin_dump_fields (struct backend *b)
printf ("max_thread_model=%s\n",
name_of_thread_model (p->plugin._thread_model));
printf ("thread_model=%s\n",
- name_of_thread_...
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...ection *conn)
}
void
-unlock_request (struct connection *conn)
+unlock_request ()
{
+ struct connection *conn = GET_CONN;
+
+ assert (conn != NULL);
+
if (pthread_rwlock_unlock (&unload_prevention_lock))
abort ();
diff --git a/server/plugins.c b/server/plugins.c
index 79d98b8c..9595269c 100644
--- a/server/plugins.c
+++ b/server/plugins.c
@@ -235,7 +235,7 @@ plugin_magic_config_key (struct backend *b)
}
static int
-plugin_preconnect (struct backend *b, struct connection *conn, int readonly)
+plugin_preconnect (struct backend *b, int readonly)
{
struct backend_plugin *p = c...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html
v2 replaces
struct connection *conn = GET_CONN;
with
GET_CONN;
which sets conn implicitly and asserts that it is non-NULL.
If we actually want to test if conn is non-NULL or behave
differently, then you must use threadlocal_get_conn() instead,
and some existing uses do that.
Rich.
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of
passing around struct connection * entirely within the server,
preferring instead to reference the connection through thread-local
storage.
I hope this is a gateway to simplifying other parts of the code.
Rich.