From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by sourceware.org (Postfix) with ESMTPS id 12282385482D for ; Fri, 30 Sep 2022 14:09:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12282385482D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ua1-x935.google.com with SMTP id b7so1754033uas.2 for ; Fri, 30 Sep 2022 07:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date; bh=5hczyUqDIW2fje87gOa/EnoYVbKCf29vikOQ3FoUo8E=; b=IeaTsnlnjZyP9zWDloYitARNgUzadOgBVPKdYNSlXzjkWdrhyh9RyB5ZXAAUUhsfMi 4vXhdIE1MAui1VlAwF4t/XlxayUB1LkibmOBoE6EyEkQwlEyH56qE+tHGm+6xmdZ7/nq JjryaSLJSCvFn8hJuQTlITqp3lDP+HT2ECgu9YwT6UaXQnU16GBdXpjNgMGhFLHGbjOD dbqaImxGMGNrWpzGRpYvpYiUiKpW6rufNV/LfGgtLdb7akulZqvnWMxUD3cleupmF5s7 yu32sPyuJ2VQHa6gN9W2zLveDsx93TCGQluJ4la5B9hhiVALaYgrJq2FWsay7gYn7yAi HURw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=5hczyUqDIW2fje87gOa/EnoYVbKCf29vikOQ3FoUo8E=; b=6r+CMRpY1OdiWv39iwktmMc3lYOO+nTJcNcYNb9nl7wx1vBjlP2MOCPN/G4tDF8uwY IrM9AK1Mx65FK4mHPrhZK6zJYQ4EicPuhbKoS/UGBM5X082uXjUQ/utWrVDYu9RhoYmc Yrv6KktoIwMYDuf5jlCSfT2PKSx7HXFj94YyIbAl4xqr2R16XXMWLdUMIUNDOTcK8n+M W0G23NHvw4yCY8iCcOwSIy5XGf8zA37/GLsnrYywtkB7iBpjd2WQzx8xWghbs0n9sKXc jM5bTZYp9pJqHO7233OkvoVFHxMaDKhsFFvudKjsurmeqkkurmOQaiUAHR6sDYP5kifQ TpxA== X-Gm-Message-State: ACrzQf2cWCIM3Wf/L99Vu06ALCJTZLBqJMma+oTer3top33BsevFXcOX /AR75tRU5xCKjkF6iF/mWloQ4PmOzdvJkWbD X-Google-Smtp-Source: AMsMyM6LrsR5McyLlrUHYVBtdgwt+5PDMhX+1ltgUAMokHdbNEbf5mxN2Hnj9TsGc3yHiTUEDfPjYQ== X-Received: by 2002:ab0:1322:0:b0:390:e7af:a87c with SMTP id g31-20020ab01322000000b00390e7afa87cmr4749426uae.113.1664546978322; Fri, 30 Sep 2022 07:09:38 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:3736:5474:7f48:dc74:6616? ([2804:1b3:a7c2:3736:5474:7f48:dc74:6616]) by smtp.gmail.com with ESMTPSA id 190-20020a1f19c7000000b003a39aa099aesm2085531vkz.27.2022.09.30.07.09.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 07:09:37 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2022 11:09:35 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v2 1/2] support: Add xpthread_cond_signal wrapper Content-Language: en-US To: Yu Chien Peter Lin , libc-alpha@sourceware.org Cc: fw@deneb.enyo.de, ycliang@andestech.com, dylan@andestech.com, alankao@andestech.com References: <20220930121951.30671-1-peterlin@andestech.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20220930121951.30671-1-peterlin@andestech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: LGTM, thanks. Reviewed-by: Adhemerval Zanella On 30/09/22 09:19, Yu Chien Peter Lin wrote: > Signed-off-by: Yu Chien Peter Lin > --- > 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 > + . */ > + > +#include > + > +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);