sysdeps/mach/hurd/profil.c (was: [PATCH] hurd: align -p and -pg behavior on Linux)
Samuel Thibault
samuel.thibault@gnu.org
Mon Apr 18 22:56:00 GMT 2016
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.
Samuel
More information about the Libc-alpha
mailing list