On 12.07.19 13:18, Norbert Lange via Xenomai wrote:
> sigprocmask should not be used in multithreaded applications,
> doing so is "unspecified".

Is this more than cosmetic on Linux? Then it should be documented here because
we shipped the change in 3.0.9, and if that may have caused regressions, users
should know.

> 
> Signed-off-by: Norbert Lange <norbert.la...@andritz.com>
> ---
>  lib/cobalt/printf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c
> index 7426f2bda..80db9516a 100644
> --- a/lib/cobalt/printf.c
> +++ b/lib/cobalt/printf.c
> @@ -647,7 +647,7 @@ static void spawn_printer_thread(void)
>       sigfillset(&sset);
>       pthread_sigmask(SIG_BLOCK, &sset, &oset);
>       pthread_create(&printer_thread, &thattr, printer_loop, NULL);
> -     sigprocmask(SIG_SETMASK, &oset, NULL);
> +     pthread_sigmask(SIG_SETMASK, &oset, NULL);
>       pthread_setname_np(printer_thread, "cobalt_printf");
>  }
>  
> 

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Reply via email to