[PATCH 2/3] ntdll: Implement thread description as information class.

Alexandre Julliard julliard at winehq.org
Mon Nov 25 06:36:32 CST 2019


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -1436,6 +1461,14 @@ DECL_HANDLER(get_thread_info)
>          reply->priority       = thread->priority;
>          reply->affinity       = thread->affinity;
>          reply->last           = thread->process->running_threads == 1;
> +        reply->desc_length    = 0;
> +
> +        if (thread->desc && req->mask & SET_THREAD_INFO_DESCRIPTION)
> +        {
> +            reply->desc_length = strlenW( thread->desc ) * sizeof(WCHAR);
> +            if (get_reply_max_size() >= reply->desc_length)
> +                set_reply_data( thread->desc, min( reply->desc_length, get_reply_max_size() ));
> +        }

I don't see why you need to check the mask for the get request.
Also in general in the server we store the length with the strings, so
that we don't need to recompute it.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list