[PATCH] nptl: pthread_rwlock_rdlock return in low priority

Xi Ruoyao xry111@xry111.site
Tue Mar 7 08:40:10 GMT 2023


On Tue, 2023-03-07 at 11:50 +0800, abushwang via Libc-alpha wrote:
> Signed-off-by: abushwang <abushwangs@gmail.com>
> ---
>  nptl/pthread_rwlock_common.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/nptl/pthread_rwlock_common.c b/nptl/pthread_rwlock_common.c
> index 5266a00ed1..35b00fc14f 100644
> --- a/nptl/pthread_rwlock_common.c
> +++ b/nptl/pthread_rwlock_common.c
> @@ -389,6 +389,7 @@ __pthread_rwlock_rdlock_full64 (pthread_rwlock_t *rwlock, clockid_t clockid,
>       complexity.  */
>    if (__glibc_likely ((r & PTHREAD_RWLOCK_WRPHASE) == 0))
>      return 0;
> +

I don't think simply adding an empty line can fix anything.

>    /* Otherwise, if we were in a write phase (states #6 or #8), we must wait
>       for explicit hand-over of the read phase; the only exception is if we
>       can start a read phase if there is no primary writer currently.  */
> --
> 2.36.1

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Libc-alpha mailing list