[08/10] C11 threads: make thrd_join more portable

Message ID 20200114185255.25813-10-samuel.thibault@ens-lyon.org
State Committed, archived
Headers

Commit Message

Samuel Thibault Jan. 14, 2020, 6:52 p.m. UTC
  by making a __pthread_join call instead of an equivalent __pthread_clockjoin_ex
call.
---
 nptl/thrd_join.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Adhemerval Zanella Netto Jan. 20, 2020, 6:53 p.m. UTC | #1
On 14/01/2020 15:52, Samuel Thibault wrote:
> by making a __pthread_join call instead of an equivalent __pthread_clockjoin_ex
> call.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  nptl/thrd_join.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/nptl/thrd_join.c b/nptl/thrd_join.c
> index 783e36f02b..0c482959d5 100644
> --- a/nptl/thrd_join.c
> +++ b/nptl/thrd_join.c
> @@ -22,7 +22,7 @@ int
>  thrd_join (thrd_t thr, int *res)
>  {
>    void *pthread_res;
> -  int err_code = __pthread_clockjoin_ex (thr, &pthread_res, 0, NULL, true);
> +  int err_code = __pthread_join (thr, &pthread_res);
>    if (res)
>     *res = (int) (uintptr_t) pthread_res;
>  
>
  

Patch

diff --git a/nptl/thrd_join.c b/nptl/thrd_join.c
index 783e36f02b..0c482959d5 100644
--- a/nptl/thrd_join.c
+++ b/nptl/thrd_join.c
@@ -22,7 +22,7 @@  int
 thrd_join (thrd_t thr, int *res)
 {
   void *pthread_res;
-  int err_code = __pthread_clockjoin_ex (thr, &pthread_res, 0, NULL, true);
+  int err_code = __pthread_join (thr, &pthread_res);
   if (res)
    *res = (int) (uintptr_t) pthread_res;