Skip to content

Conversation

@extinguish
Copy link

Summary

Added support for signal decoupling, primarily involving modifications to the following modules in the apps: ostest, nsh/tools, netutils, and the cu tool.

  1. ostest: When CONFIG_DISABLE_SIGNALS=y, certain tests that rely on signal functionality need to be disabled.
  2. nsh/tools: Functionalities dependent on the signal module have been made configurable, allowing most parts of nsh to remain usable even when CONFIG_DISABLE_SIGNALS=y.
  3. netutils: Ensures basic usability of certain network functionalities when signals are disabled.
  4. cu tool: Refactored portions of the cu module implementation to maintain its usability under signal-disabled conditions.

Impact

No adjustments were made to the functional logic; support was only added for when CONFIG_DISABLE_SIGNALS=y.

Testing

  1. has passed the ostest

1. sigprocmask_test/sighand_test/signest_test/suspend_test: these testcases are using to test the signal api
2. sigev_thread_test: this testcase need to access signal related function
3. timer_test: this testcase need to access signal related function

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
make the nsh tools can work with SIGNAL disabled

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
using pthread_cancel to implement the exit logic, thus to make the
netutils tools can work when signal disabled

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
using the local cu_globals_s instance to manange the cu exit procedure

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
merge the cu.h to cu_main.c, to make the cu tools code more cleaner

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
The core functionality of the cu tool does not rely on
signal features. Therefore, we can isolate the signal-related
implementations to ensure that most functions of the
cu tool remain operational even when signals are disabled.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
The commit 'add support for CONFIG_DISABLE_SIGNALS' led to:

undefined reference to `signal'
undefined reference to `sigaction'

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
…GNALS

The commit 'add support for CONFIG_DISABLE_SIGNALS' led to:

undefined reference to `sigaction'

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants