From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14198 invoked from network); 23 Feb 2022 01:19:22 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 23 Feb 2022 01:19:22 -0000 Received: (qmail 25923 invoked by uid 550); 23 Feb 2022 01:19:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 25863 invoked from network); 23 Feb 2022 01:19:18 -0000 Date: Tue, 22 Feb 2022 20:19:05 -0500 From: Rich Felker To: Lee Shallis Cc: musl@lists.openwall.com Message-ID: <20220223011904.GX7074@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Suggestion for thread safety On Mon, Feb 21, 2022 at 11:36:06AM +0000, Lee Shallis wrote: > First I'll start with the code snippets I've copied from my own code: > [...] > > Take what you will of the above, the Allot function was included just > to give you an idea of how the locks are made, as for pauseCB that > should be re-mapped to a variant that calls something like > pthread_yield(), it's what I tested with, anyways the general idea is > that the shared lock defaults to NULL when not locked, when you want > [...] Is there any context to this? Some problem you're setting out to solve in relationship to musl? We already have synchronization, using well-understood standard primitives wherever it's possible and practical. Are you advocating for doing something different, or just explaining something you made? Rich