[vlc-devel] [PATCH 3/4] modules: set names to threads created in modules
Steve Lhomme
robux4 at ycbcr.xyz
Mon Nov 9 15:39:21 CET 2020
On 2020-11-09 15:28, Steve Lhomme wrote:
> diff --git a/modules/access/http/h2output.c b/modules/access/http/h2output.c
> index 74188ef29c4..7e335e000af 100644
> --- a/modules/access/http/h2output.c
> +++ b/modules/access/http/h2output.c
> @@ -255,7 +255,7 @@ static int vlc_h2_frame_send(struct vlc_tls *tls, struct vlc_h2_frame *f)
> }
>
> /** Output thread */
> -static void *vlc_h2_output_thread(void *data)
> +static void *output_thread(void *data)
> {
> struct vlc_h2_output *out = data;
> struct vlc_h2_frame *frame;
> @@ -283,11 +283,20 @@ static void *vlc_h2_output_thread(void *data)
> return NULL;
> }
>
> +static void *vlc_h2_output_thread(void *data, bool client)
Boolean leftover from a previous version. Fixed locally.
> +{
> + vlc_thread_set_name("vlc-access-http2-out");
> +
> + return output_thread(data);
> +}
> +
> static void *vlc_h2_client_output_thread(void *data)
> {
> static const char http2_hello[] = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
> struct vlc_h2_output *out = data;
>
> + vlc_thread_set_name("vlc-access-http2-client-out");
> +
> if (vlc_https_send(out->tls, http2_hello, 24) < 24)
> {
> vlc_mutex_lock(&out->lock);
> @@ -296,7 +305,7 @@ static void *vlc_h2_client_output_thread(void *data)
> return NULL;
> }
>
> - return vlc_h2_output_thread(data);
> + return output_thread(data);
> }
>
More information about the vlc-devel
mailing list