nptl: Fix type of pthread_mutexattr_setrobust_np (bug 28036)

Message ID 87im011t6k.fsf@oldenburg.str.redhat.com
State Superseded
Headers
Series nptl: Fix type of pthread_mutexattr_setrobust_np (bug 28036) |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Florian Weimer Aug. 19, 2021, 1:05 p.m. UTC
  Tested on i686-linux-gnu, x86_64-linux-gnu.

---
 sysdeps/nptl/pthread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Florian Weimer Sept. 6, 2021, 12:27 p.m. UTC | #1
* Florian Weimer via Libc-alpha:

> Tested on i686-linux-gnu, x86_64-linux-gnu.
>
> ---
>  sysdeps/nptl/pthread.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
> index f1b7f2bdc6..2d665c2b50 100644
> --- a/sysdeps/nptl/pthread.h
> +++ b/sysdeps/nptl/pthread.h
> @@ -949,7 +949,7 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
>  # ifdef __USE_GNU
>  #  ifdef __REDIRECT_NTH
>  extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
> -			   (pthread_mutex_t *, int),
> +			   (pthread_mutexattr_t *, int),
>  			   pthread_mutexattr_setrobust) __nonnull ((1))
>    __attribute_deprecated_msg__ ("\
>  pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");

Ping?

Thanks,
Florian
  
Andreas Schwab Sept. 6, 2021, 12:40 p.m. UTC | #2
This is incmplete.

Andreas.
  
Florian Weimer Sept. 6, 2021, 1:58 p.m. UTC | #3
* Andreas Schwab:

> This is incmplete.

How so?  I asked around and no one else could spot this incompleteness.

Thanks,
Florian
  
Andreas Schwab Sept. 6, 2021, 2:27 p.m. UTC | #4
Did you read the bug?

Andreas.
  
Florian Weimer Sept. 6, 2021, 2:31 p.m. UTC | #5
* Andreas Schwab:

> Did you read the bug?

Thanks, I see it now, pthread_mutexattr_getrobust_np needs fixing as
well.

Thanks,
Florian
  
Carlos O'Donell Sept. 6, 2021, 3:57 p.m. UTC | #6
On 9/6/21 10:27 AM, Andreas Schwab wrote:
> Did you read the bug?

Thank you for your review.

In the future may you please provide more constructive and
actionable review?

You and Florian had to iterate twice here, and that could have
been avoided if you had pointed out the missing prototype change
in the original patch.
  

Patch

diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index f1b7f2bdc6..2d665c2b50 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -949,7 +949,7 @@  extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
 # ifdef __USE_GNU
 #  ifdef __REDIRECT_NTH
 extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
-			   (pthread_mutex_t *, int),
+			   (pthread_mutexattr_t *, int),
 			   pthread_mutexattr_setrobust) __nonnull ((1))
   __attribute_deprecated_msg__ ("\
 pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");