search for: 418945fe

Displaying 3 results from an estimated 3 matches for "418945fe".

2020 Feb 11
0
[PATCH nbdkit 1/3] server: Add GET_CONN macro, alias for threadlocal_get_conn ().
...ze); extern void threadlocal_set_conn (struct connection *conn); extern struct connection *threadlocal_get_conn (void); +#define GET_CONN (threadlocal_get_conn ()) /* Declare program_name. */ #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1 diff --git a/server/public.c b/server/public.c index 418945fe..8fa7e21b 100644 --- a/server/public.c +++ b/server/public.c @@ -533,7 +533,7 @@ nbdkit_nanosleep (unsigned sec, unsigned nsec) * NBD_CMD_DISC or a problem with the connection * - the input socket detects POLLRDHUP/POLLHUP/POLLERR */ - struct connection *conn = threadlocal_get_conn (...
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.