From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-5.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 56E601F8C6 for ; Tue, 7 Sep 2021 19:28:55 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1481D385C40B for ; Tue, 7 Sep 2021 19:28:54 +0000 (GMT) Received: from zimbra.cs.ucla.edu (zimbra.cs.ucla.edu [131.179.128.68]) by sourceware.org (Postfix) with ESMTPS id 7DE163858001 for ; Tue, 7 Sep 2021 19:28:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7DE163858001 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D5019160129; Tue, 7 Sep 2021 12:28:41 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ctyLOs_R4XDs; Tue, 7 Sep 2021 12:28:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2341816012F; Tue, 7 Sep 2021 12:28:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 54vDXr6c57Js; Tue, 7 Sep 2021 12:28:41 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id ED274160129; Tue, 7 Sep 2021 12:28:40 -0700 (PDT) To: Adhemerval Zanella , Carlos O'Donell References: <20210903171144.952737-1-adhemerval.zanella@linaro.org> <3d2c0890-7a7e-518e-d39e-e3b0df85dd94@cs.ucla.edu> <54a8f384-dfe4-db41-a09e-2209e0e62478@cs.ucla.edu> <6e9bbf08-4a76-6d33-1319-abda26a19692@linaro.org> <9d8c44d4-4112-4bfe-0ad8-0504e70665ec@cs.ucla.edu> <1a79a7d6-fdaf-c046-d5bf-28fa765df125@linaro.org> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: [PATCH v3 0/7] Use introsort for qsort Message-ID: <31ead1a4-63b2-6134-a094-0077159a9595@cs.ucla.edu> Date: Tue, 7 Sep 2021 12:28:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1a79a7d6-fdaf-c046-d5bf-28fa765df125@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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: , Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 9/7/21 11:07 AM, Adhemerval Zanella wrote: > we are providing > async-safeness depending of the input arguments (which is really a > bad interface). Many functions are async-signal-safe for some arguments but not others.=20 The 'free' function is just one example. qsort is not at all unusual in=20 this department. This sort of interface is "really bad" only in the=20 sense that every function that is not async-signal-safe is "really bad". > My point is blocks neither closures are essential to provide different > sort algorithms with different strategies and constraints. If that's the point, then I disagree. qsort_r is there for a reason, and=20 this reason applies to any sorting algorithm. Some callers can limp=20 along without qsort_r, by writing code that is not thread-safe or=20 whatever; but many callers really need qsort_r and a similar need would=20 apply to any sorting algorithm. >> > Would you like to work together to come up with a new API that addre= sses both of our concerns? > I am not against your suggestion That's a good way forward, then. Do you have an API in mind? If not, I=20 can propose one.