This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Async signal safe TLS accesses


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]