Hi, Petro,

The first thing that I would want to know is:  Is it really necessary to be able to reconfigure signal numbers?  Is there any real reason to do that now?  I put the configurable signal numbers in because there was a limit of 31 signals.  But recently, that has been extended to 255 signals (configurable).

So can we just get rid of the configurations and just make the signal numbers fixed (and equal to the fixed numbers assigned by Linux)?

That would make your job easier and, I think, clean up some useless stuff in the OS.

Greg

On 3/21/2023 12:18 PM, Petro Karashchenko wrote:
Hello team,

Recently I've been looking into signal implementation and particularly into
strsignal() API. As a result I've drafted
https://github.com/apache/nuttx/pull/8867 that intends to optimize the
implementation, but during CI I found out that some configurations have
different signal numbers defined to the same values. So my question is
about how strsignal() should behave in such case? My initial approach was
to use switch/case to select string corresponding to the signal number
value, but if the values are duplicated (triplicated, etc.) then
switch/case simply generate compilation error.

I need some advice on how to implement/refine this properly.

Best regards,
Petro


Reply via email to