This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] [PATCH] Remove custom pthread_once implementation on sh.
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: triegel at redhat dot com
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 09 Dec 2014 09:01:49 +0900 (JST)
- Subject: Re: [RFC] [PATCH] Remove custom pthread_once implementation on sh.
- Authentication-results: sourceware.org; auth=none
- References: <1418061225 dot 25868 dot 102 dot camel at triegel dot csb>
Torvald Riegel <email@example.com> wrote:
> This patch removes the custom implementation of pthread_once on sh. I
> have not tested this, but the generic implementation in
> nptl/pthread_once.c works well on several architectures.
> I don't claim to really understand sh assembly, but given that sh
> defines no HW barriers it seems that the pthread_once fast path would
> just be a normal load and a compiler barrier, which should be as fast in
> C as in assembler.
> Removing the custom implementation will ease maintenance. If we decide
> not to, I'd at least like to document why in the source of the custom
> custom implementation.
> Thoughts? OK to commit?
You are right. The patch is OK.