This is the mail archive of the
mailing list for the glibc project.
Re: sysdeps/mach/hurd/profil.c (was: [PATCH] hurd: align -p and -pg behavior on Linux)
- From: Samuel Thibault <samuel dot thibault at gnu dot org>
- To: Thomas Schwinge <thomas at codesourcery dot com>, Roland McGrath <roland at hack dot frob dot com>, bug-hurd at gnu dot org, libc-alpha at sourceware dot org
- Date: Tue, 19 Apr 2016 00:56:29 +0200
- Subject: Re: sysdeps/mach/hurd/profil.c (was: [PATCH] hurd: align -p and -pg behavior on Linux)
- Authentication-results: sourceware.org; auth=none
- References: <20150919120023 dot GA12911 at var dot home> <87bn75ybeb dot fsf at kepler dot schwinge dot homeip dot net> <8760xcyjfi dot fsf at kepler dot schwinge dot homeip dot net> <20160225142313 dot GV3460 at var dot bordeaux dot inria dot fr>
Samuel Thibault, on Thu 25 Feb 2016 15:23:13 +0100, wrote:
> > As there are accesses to variables shared between different threads,
> > should these be re-written to use GCC's atomic/sync load/store builtins
> > with appropriate semantics?
> The current way seems unsafe at least between update_waiter and
> fetch_samples, indeed. I'd say just go with a libc_lock.
Actually there is already a spinlock to protect all of what I mentioned
:) I have fixed the remaining initialization issue.