Re: [PATCH] cobalt: remove call to sigprocmask

2019-07-12 Thread Jan Kiszka via Xenomai
On 12.07.19 15:26, Lange Norbert via Xenomai wrote:
> 
> 
>> -Original Message-
>> From: Xenomai  On Behalf Of Jan Kiszka
>> via Xenomai
>> Sent: Freitag, 12. Juli 2019 15:07
>> To: Norbert Lange ; xenomai@xenomai.org
>> Subject: Re: [PATCH] cobalt: remove call to sigprocmask
>>
>> E-MAIL FROM A NON-ANDRITZ SOURCE: AS A SECURITY MEASURE, PLEASE
>> EXERCISE CAUTION WITH E-MAIL CONTENT AND ANY LINKS OR
>> ATTACHMENTS.
>>
>>
>> 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.
> 
> There is no practical issue to be expected, AFAIK with NPTL at least.
> The only issue could be, that libpthread is not pulled in (might need to run 
> some setup), but that’s ensured with libcobalt.

OK, applied to next. Will add to stable as well, just to avoid confusion.

> 
> Sorry for the mess, must have send a stale patch in the first place (always 
> get problems with whitespace issues).
> 

No problem.

Thanks,
Jan

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



RE: [PATCH] cobalt: remove call to sigprocmask

2019-07-12 Thread Lange Norbert via Xenomai


> -Original Message-
> From: Xenomai  On Behalf Of Jan Kiszka
> via Xenomai
> Sent: Freitag, 12. Juli 2019 15:07
> To: Norbert Lange ; xenomai@xenomai.org
> Subject: Re: [PATCH] cobalt: remove call to sigprocmask
>
> E-MAIL FROM A NON-ANDRITZ SOURCE: AS A SECURITY MEASURE, PLEASE
> EXERCISE CAUTION WITH E-MAIL CONTENT AND ANY LINKS OR
> ATTACHMENTS.
>
>
> 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.

There is no practical issue to be expected, AFAIK with NPTL at least.
The only issue could be, that libpthread is not pulled in (might need to run 
some setup), but that’s ensured with libcobalt.

Sorry for the mess, must have send a stale patch in the first place (always get 
problems with whitespace issues).

Norbert




This message and any attachments are solely for the use of the intended 
recipients. They may contain privileged and/or confidential information or 
other information protected from disclosure. If you are not an intended 
recipient, you are hereby notified that you received this email in error and 
that any review, dissemination, distribution or copying of this email and any 
attachment is strictly prohibited. If you have received this email in error, 
please contact the sender and delete the message and any attachment from your 
system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You



Re: [PATCH] cobalt: remove call to sigprocmask

2019-07-12 Thread Jan Kiszka via Xenomai
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 
> ---
>  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();
>   pthread_sigmask(SIG_BLOCK, , );
>   pthread_create(_thread, , printer_loop, NULL);
> - sigprocmask(SIG_SETMASK, , NULL);
> + pthread_sigmask(SIG_SETMASK, , NULL);
>   pthread_setname_np(printer_thread, "cobalt_printf");
>  }
>  
> 

Jan

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