public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Yu Chien Peter Lin <peterlin@andestech.com>, libc-alpha@sourceware.org
Cc: fw@deneb.enyo.de, ycliang@andestech.com, dylan@andestech.com,
	alankao@andestech.com
Subject: Re: [PATCH v2 1/2] support: Add xpthread_cond_signal wrapper
Date: Fri, 30 Sep 2022 11:09:35 -0300	[thread overview]
Message-ID: <c3899b8d-6bad-7b8e-26e9-d44b61c69dae@linaro.org> (raw)
In-Reply-To: <20220930121951.30671-1-peterlin@andestech.com>

LGTM, thanks.

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

On 30/09/22 09:19, Yu Chien Peter Lin wrote:
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> ---
>  support/Makefile               |  1 +
>  support/xpthread_cond_signal.c | 26 ++++++++++++++++++++++++++
>  support/xthread.h              |  1 +
>  3 files changed, 28 insertions(+)
>  create mode 100644 support/xpthread_cond_signal.c
> 
> diff --git a/support/Makefile b/support/Makefile
> index 551d02941f..4046b12fbd 100644
> --- a/support/Makefile
> +++ b/support/Makefile
> @@ -159,6 +159,7 @@ libsupport-routines = \
>    xpthread_cancel \
>    xpthread_check_return \
>    xpthread_cond_wait \
> +  xpthread_cond_signal \
>    xpthread_create \
>    xpthread_detach \
>    xpthread_join \
> diff --git a/support/xpthread_cond_signal.c b/support/xpthread_cond_signal.c
> new file mode 100644
> index 0000000000..ed0be1a8ab
> --- /dev/null
> +++ b/support/xpthread_cond_signal.c
> @@ -0,0 +1,26 @@
> +/* pthread_cond_signal with error checking.
> +   Copyright (C) 2022 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include <support/xthread.h>
> +
> +void
> +xpthread_cond_signal (pthread_cond_t *cond)
> +{
> +  xpthread_check_return
> +    ("pthread_cond_signal", pthread_cond_signal (cond));
> +}
> diff --git a/support/xthread.h b/support/xthread.h
> index af06715f46..ae09649325 100644
> --- a/support/xthread.h
> +++ b/support/xthread.h
> @@ -62,6 +62,7 @@ void xpthread_mutex_consistent (pthread_mutex_t *);
>  void xpthread_spin_lock (pthread_spinlock_t *lock);
>  void xpthread_spin_unlock (pthread_spinlock_t *lock);
>  void xpthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex);
> +void xpthread_cond_signal (pthread_cond_t *cond);
>  pthread_t xpthread_create (pthread_attr_t *attr,
>                             void *(*thread_func) (void *), void *closure);
>  void xpthread_detach (pthread_t thr);

      parent reply	other threads:[~2022-09-30 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 12:19 Yu Chien Peter Lin
2022-09-30 12:19 ` [PATCH v2 2/2] nptl: Convert tst-setuid2 to test-driver Yu Chien Peter Lin
2022-09-30 14:10   ` Adhemerval Zanella Netto
2022-09-30 14:09 ` Adhemerval Zanella Netto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3899b8d-6bad-7b8e-26e9-d44b61c69dae@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=alankao@andestech.com \
    --cc=dylan@andestech.com \
    --cc=fw@deneb.enyo.de \
    --cc=libc-alpha@sourceware.org \
    --cc=peterlin@andestech.com \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).