This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix double-checked locking in _res_hconf_reorder_addrs [BZ #19074]
- From: Siddhesh Poyarekar <sid at reserved-bit dot com>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: Torvald Riegel <triegel at redhat dot com>
- Date: Tue, 6 Oct 2015 21:46:33 +0530
- Subject: Re: [PATCH] Fix double-checked locking in _res_hconf_reorder_addrs [BZ #19074]
- Authentication-results: sourceware.org; auth=none
- References: <5613BF47 dot 9000503 at redhat dot com> <5613D5F5 dot 7020603 at reserved-bit dot com> <5613DBB6 dot 8020109 at redhat dot com>
On Tuesday 06 October 2015 08:03 PM, Florian Weimer wrote:
> Do we have documentation on the wiki for common concurrency idioms?
Not that I know.
> It's probably best to document things that work and way, and stick to
> that, instead of using ad-hoc schemes all over the place. (I think the
> code I showed is sufficiently close to the usual double-checked locking
> idiom, except that the guarded section may run multiple times.)
A wiki page may be useful, but it's not a replacement for a code comment
that explains why it works, which is specific to the code block in question.
Siddhesh