This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] pthread_once: Use unified variant instead of custom x86_64/i386
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>, andi <andi at firstfloor dot org>
- Date: Sun, 19 Oct 2014 18:37:16 -0700 (PDT)
- Subject: Re: [RFC] pthread_once: Use unified variant instead of custom x86_64/i386
- Authentication-results: sourceware.org; auth=none
- References: <1381523328 dot 18547 dot 3422 dot camel at triegel dot csb> <1396878469 dot 10643 dot 8959 dot camel at triegel dot csb> <1413751577 dot 8483 dot 27 dot camel at triegel dot csb>
> +static int
> +__attribute__((noinline))
Space before paren.
> +__pthread_once_slow (pthread_once_t *once_control, void (*init_routine) (void))
This needs a comment explaining why it's separate. I would have expected
the compiler to generate essentially the same code for the early bailout
case marked with __glibc_likely.
> + atomic_read_barrier();
[...]
> + return __pthread_once_slow(once_control, init_routine);
Space before paren.