From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id A8808385740C for ; Tue, 1 Jun 2021 09:58:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A8808385740C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-L6KXI_wvMwmMa53gvOFuag-1; Tue, 01 Jun 2021 05:58:15 -0400 X-MC-Unique: L6KXI_wvMwmMa53gvOFuag-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44B02105045D; Tue, 1 Jun 2021 09:58:14 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-228.ams2.redhat.com [10.36.113.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 50EBA1037F21; Tue, 1 Jun 2021 09:58:13 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH v2 5/9] nptl: Move cancel state out of cancelhandling References: <20210527172823.3461314-1-adhemerval.zanella@linaro.org> <20210527172823.3461314-6-adhemerval.zanella@linaro.org> Date: Tue, 01 Jun 2021 11:58:11 +0200 In-Reply-To: <20210527172823.3461314-6-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Thu, 27 May 2021 14:28:19 -0300") Message-ID: <877djd7vpo.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2021 09:58:17 -0000 * Adhemerval Zanella via Libc-alpha: > Now that thread cancellation state is not accessed concurrently anymore, > it is possible to move it out the 'cancelhandling'. > > The code is also simplified: the CANCELLATION_P is replaced with a Drop =E2=80=9Cthe=E2=80=9D? > internal pthread_testcancel call and the CANCELSTATE_BIT{MASK} is > removed. > > The second part of this patchset also keeps the pthread_setcanceltype as > cancellation entrypoint by calling pthread_testcancel if the new type > is PTHREAD_CANCEL_ASYNCHRONOUS. What do you mean by =E2=80=9Cpatchset=E2=80=9D in this context? It's in th= e same commit, right? > With this behavior pthread_setcancelstate does not require to act on > cancellation if cancel type is asynchronous (is already handled either > by pthread_setcanceltype or by the signal handler). Is this really true? What is supposed to happen with a pending asynchronous cancellation request if cancellation is disabled for the target thread? Isn't it supposed to be queued if it's a self-cancel? Thanks, Florian