You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/03/25 13:15:10 UTC

[GitHub] [nuttx-apps] xiaoxiang781216 opened a new pull request, #1683: Signal

xiaoxiang781216 opened a new pull request, #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683

   ## Summary
   
   - system/cu: Remove the duplicated SIGINT definition
   - testing/ostest: Define the private used signal to SIGRTMIN 
   - testing/ostest: Remove the unreal used SIG_WAITCANCEL
   
   ## Impact
   
   Minor
   
   ## Testing
   
   sim:ostest


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483859565

   > > I would not state that those are "invalid".
   > 
   > I think it depends on how much of a purist you are. Most of the standard signals have not yet been implemented so re-using an unimplemented standard signal is safe.
   > 
   > However, I intend to look at fixing some of the errors with real time time signal prioritization. So if you really want to participate is prioritized real time signal behavior, you have to use the signals in the real time signal range (SIGRTMIN through SIGRTMAX). Standard signals have different behaviors: The no required to be queue; if queued, they should be FIFO.
   > 
   > NuttX current queues all signals FIFO.
   
   Yes. I agree for sure. So if application is interested if the event happened and does not care how many times or even producer can publish number of times in`si_value` the one of the "standard" signal number can be used. But if application is interested in every event (like all "mount"/"unmount" events) then definitely realtime signals + FIFO is the only option.
   I just intended to say that not all results of the `gerp` that you provided should be blindly changed to 30.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1149368018


##########
examples/alarm/Kconfig:
##########
@@ -33,6 +33,6 @@ config EXAMPLES_ALARM_DEVPATH
 
 config EXAMPLES_ALARM_SIGNO
 	int "Alarm signal"
-	default 1

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483860665

   > I just intended to say that not all results of the `gerp` that you provided should be blindly changed to 30.
   
   There is no emergency that requires a change in those cases.  But I don't think this is a loophole that the typical user can use:  How could they know which standard signals are safe to reuse for a different purpose.
   
   Bad code tends to get replicated numerous time so it would be nice only to have pristine code examples in apps, but not necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1148574681


##########
examples/alarm/Kconfig:
##########
@@ -33,6 +33,6 @@ config EXAMPLES_ALARM_DEVPATH
 
 config EXAMPLES_ALARM_SIGNO
 	int "Alarm signal"
-	default 1

Review Comment:
   Maybe we can default to `SIGRTMIN`?
   or maybe add some range check to make sure that this is a realtime signal



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487497263

   @xiaoxiang781216 could you please rebase PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483857623

   > I would not state that those are "invalid".
   
   I think it depends on how much of a purist you are.  Most of the standard signals have not yet been implemented so re-using an unimplemented standard signal is safe.
   
   However, I intend to look at fixing some of the errors with real time time signal prioritization.  So if you really want to participate is prioritized real time signal behavior, you have to use the signals in the real time signal range (SIGRTMIN through SIGRTMAX).  Standard signals have different behaviors:  The no required to be queue; if queued, they should be FIFO.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483838776

   Ok, the default value change to 30 and remove the unused macros.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487496587

   Some configs have it enabled, but CI changes the toolchain to either GNU_EABI or CLANG, so the actual build is done with one of those


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] davids5 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1151432282


##########
include/graphics/twm4nx/twm4nx_config.hxx:
##########
@@ -448,7 +448,7 @@
  */
 
 #ifndef CONFIG_TWM4NX_INPUT_SIGNO
-#  define CONFIG_TWM4NX_INPUT_SIGNO 6
+#  define CONFIG_TWM4NX_INPUT_SIGNO 33

Review Comment:
   typo?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1149332815


##########
examples/README.md:
##########
@@ -60,7 +60,7 @@ Example Configuration:
 - `CONFIG_EXAMPLES_AJOYSTICK_DEVNAME` – Joystick device name. Default
   `/dev/adjoy0`.
 - `CONFIG_EXAMPLES_AJOYSTICK_SIGNO` – Signal used to signal the test
-  application. Default `13`.
+  application. Default `30`.

Review Comment:
   Now it need to be moved at least to SIGRTMIN (aka 32)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1151438835


##########
include/graphics/twm4nx/twm4nx_config.hxx:
##########
@@ -448,7 +448,7 @@
  */
 
 #ifndef CONFIG_TWM4NX_INPUT_SIGNO
-#  define CONFIG_TWM4NX_INPUT_SIGNO 6
+#  define CONFIG_TWM4NX_INPUT_SIGNO 33

Review Comment:
   No, this problem use two signal 5/6 at th same time, we need map to 32/33.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483860180

   Actually there are two FIFOs :) The first one is the FIFO of different signal values and a FIFO of realtime signals of a same value


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1484120243

   > Most likely `SIGUSR1` and `SIGUSR2` can be used for sure. Or I'm missing something?
   
   Correct.  They exist only because they were defined many years before the POSIX real time extensions that added real time signal support.  So they are not being re-used; that is their intended use.  They are precursor real time signals with properties like standard signals.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1149363524


##########
examples/alarm/Kconfig:
##########
@@ -33,6 +33,6 @@ config EXAMPLES_ALARM_DEVPATH
 
 config EXAMPLES_ALARM_SIGNO
 	int "Alarm signal"
-	default 1

Review Comment:
   Can this be resolved?  This PR does not address the Kconfig signal number settings any more.



##########
examples/README.md:
##########
@@ -60,7 +60,7 @@ Example Configuration:
 - `CONFIG_EXAMPLES_AJOYSTICK_DEVNAME` – Joystick device name. Default
   `/dev/adjoy0`.
 - `CONFIG_EXAMPLES_AJOYSTICK_SIGNO` – Signal used to signal the test
-  application. Default `13`.
+  application. Default `30`.

Review Comment:
   Can this be resolved? This PR does not address the Kconfig signal number settings any more.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483836474

   I would not state that those are "invalid". There is a code that re-use one of the standard signals. Like
   ```
   signal(CONFIG_EXAMPLES_BUTTONS_SIGNO, SIG_IGN);
   
         sigemptyset(&set);
         sigaddset(&set, CONFIG_EXAMPLES_BUTTONS_SIGNO);
         ret = sigwaitinfo(&set, &value);
   ```
   So this can work in theory, however I think that `sighold(CONFIG_EXAMPLES_BUTTONS_SIGNO)` should be added otherwise signal will bypass sigqueue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483863074

   I think we should wait for https://github.com/apache/nuttx/pull/8885 to get merged as 30 now is an RT signal, but after the PR it will be in standard signal range.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1151438835


##########
include/graphics/twm4nx/twm4nx_config.hxx:
##########
@@ -448,7 +448,7 @@
  */
 
 #ifndef CONFIG_TWM4NX_INPUT_SIGNO
-#  define CONFIG_TWM4NX_INPUT_SIGNO 6
+#  define CONFIG_TWM4NX_INPUT_SIGNO 33

Review Comment:
   No, this program uses two signal 5/6 at the same time, we need map to 32/33.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487491570

   Looks like this is trying to use the NuttX buildroot toolchain:
   
       /usr/bin/bash: arm-nuttx-eabi-gcc: command not found
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] davids5 merged pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 merged PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1483861352

   > How could they know which standard signals are safe to reuse for a different purpose.
   
   Most likely `SIGUSR1` and `SIGUSR2` can be used for sure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1484119256

   In the Kconfig files, when a signal number value is selectable, it should be limited by:
   
       range 32 63
   
   With nuttx PR 8885, we will have have RTSIG_MAX of 32 and (), SIGRTMIN=32 and SIGRTMIN=63 which is in agreement with Linux.
   
   The signals 30 and 31 are reserved.  Linux does that to; it uses some hidden internal signals with each process so that the range of standard and real time signals has a small hole it too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1149367043


##########
examples/README.md:
##########
@@ -60,7 +60,7 @@ Example Configuration:
 - `CONFIG_EXAMPLES_AJOYSTICK_DEVNAME` – Joystick device name. Default
   `/dev/adjoy0`.
 - `CONFIG_EXAMPLES_AJOYSTICK_SIGNO` – Signal used to signal the test
-  application. Default `13`.
+  application. Default `30`.

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487976441

   Done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org