This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Async signal safe TLS accesses
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andrew Hunter <ahh at google dot com>
- Cc: <libc-alpha at sourceware dot org>, <carlos at redhat dot com>, <iant at google dot com>, <ppluzhnikov at google dot com>
- Date: Thu, 3 Oct 2013 20:37:57 +0000
- Subject: Re: [PATCH] Async signal safe TLS accesses
- Authentication-results: sourceware.org; auth=none
- References: <1379977289-21260-1-git-send-email-ahh at google dot com> <1380830518-16721-1-git-send-email-ahh at google dot com>
On Thu, 3 Oct 2013, Andrew Hunter wrote:
> +/* mask every signal, returning the previous sigmask in <old>. */
GNU Coding Standards formatting for comments, here and elsewhere.
> +void
> +internal_function
> +_dl_mask_all_signals (sigset_t *old)
> +{
> + sigset_t new;
> + sigfillset(&new);
Missing space before '(', here and elsewhere.
> + INTERNAL_SYSCALL_DECL (err);
> +
> + ret = INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &new, old,
> + _NSIG / 8);
I don't believe this code (in elf/) can assume syscalls exist (it's used
on Hurd, for example); anything using them needs to be in an appropriate
sysdeps directory (if rt_sigprocmask is Linux-specific rather than a more
generic Unix syscall, that means sysdeps/unix/sysv/linux). I suppose you
could use the existing dl-sysdep.c, or a new file.
> @@ -43,7 +44,6 @@ oom (void)
> }
> #endif
>
> -
> size_t
> internal_function
> _dl_next_tls_modid (void)
Avoid this sort of spurious change.
> diff --git a/nptl/tst-tls7.c b/nptl/tst-tls7.c
> new file mode 100644
> index 0000000..5613b83
> --- /dev/null
> +++ b/nptl/tst-tls7.c
> @@ -0,0 +1,103 @@
> +#include <dlfcn.h>
All new files should start with a comment describing the file, then the
copyright and license notices.
--
Joseph S. Myers
joseph@codesourcery.com