Skip to content

Conversation

@wangchdo
Copy link
Contributor

Summary

THis PR includes below three updates:

  1. updatesleep()and usleep() to use nxsched_nanosleep() when all signals are disabled, so when all signals are disabled, sleep function can still be available and ostest can pass
  2. remove pthread_kill() and pthread_sigmask() implementations when all signals are disabled, since these two functions rely on signals
  3. remove the altmdm_timer related implementation and API definitions when all signals are disabled, since they rely on signals

Impact

Improve the implementation when all signals are disabled, only impact the functions when all signals are disabled.

Testing

ostest for when all signals are disabled depends on apache/nuttx-apps#3333

ostest passed on rv-virt:smp64

img_v3_02u2_8490fb47-4f24-475c-805c-1315797504dg

NuttShell (NSH)
nsh> 
nsh> 
nsh> uname -a 
NuttX 0.0.0 13e8f81f01-dirty Jan 18 2026 22:15:53 risc-v rv-virt
nsh> ostest

(...)

user_main: smp call test
smp_call_test: Test start
smp_call_test: Call cpu 0, nowait
smp_call_test: Call cpu 0, wait
smp_call_test: Call cpu 1, nowait
smp_call_test: Call cpu 1, wait
smp_call_test: Call cpu 2, nowait
smp_call_test: Call cpu 2, wait
smp_call_test: Call cpu 3, nowait
smp_call_test: Call cpu 3, wait
smp_call_test: Call cpu 4, nowait
smp_call_test: Call cpu 4, wait
smp_call_test: Call cpu 5, nowait
smp_call_test: Call cpu 5, wait
smp_call_test: Call cpu 6, nowait
smp_call_test: Call cpu 6, wait
smp_call_test: Call cpu 7, nowait
smp_call_test: Call cpu 7, wait
smp_call_test: Call multi cpu, nowait
smp_call_test: Call in interrupt, wait
smp_call_test: Call multi cpu, wait
smp_call_test: Test success

Final memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena     1fc3780  1fc3780
ordblks         1        6
mxordblk  1fb86d8  1fa2b78
uordblks     b0a8    11f20
fordblks  1fb86d8  1fb1860
user_main: Exiting
ostest_main: Exiting with status 0
nsh> 

@github-actions github-actions bot added Area: Drivers Drivers issues Area: OS Components OS Components issues Size: S The size of the change in this PR is small labels Jan 18, 2026
@wangchdo wangchdo force-pushed the fix_disable_all_signals_issue branch 2 times, most recently from c53b84a to 6b46448 Compare January 18, 2026 15:17
  When all signals are disabled, remove the altmdm_timer-related
  implementation and API definitions.

Signed-off-by: Chengdong Wang <[email protected]>
@wangchdo wangchdo force-pushed the fix_disable_all_signals_issue branch from 6b46448 to a1c1f12 Compare January 19, 2026 02:36
@github-actions github-actions bot added Area: Networking Effects networking subsystem Area: File System File System issues Area: Sensors Sensors issues Area: Graphics Size: M The size of the change in this PR is medium labels Jan 19, 2026
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
DEV_GPIO_NSIGNALS relies on signal support. Add an explicit Kconfig
dependency on SIGNALS to prevent invalid no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, remove pthread_kill and pthread_sigmask
implementations.

Signed-off-by: Chengdong Wang <[email protected]>
update sleep and usleep to use nxsched_nanosleep wihen all signals
are disabled

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
…abled

When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
…bled

When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
@wangchdo wangchdo force-pushed the fix_disable_all_signals_issue branch from a1c1f12 to fb52bef Compare January 19, 2026 03:05
… disabled

When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <[email protected]>
@wangchdo wangchdo force-pushed the fix_disable_all_signals_issue branch from fb52bef to 286d12b Compare January 19, 2026 03:07
/* Have any signal events occurred? */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if ((press & opriv->bo_notify.bn_press) != 0 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nee d remove from btn_open_s

/* Have any signal events occurred? */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if ((press & opriv->do_notify.dn_press) != 0 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need remove from djoy_open_s


/* Yes.. Signal the client */

info->event.sigev_value.sival_int = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need guard event in ft80x_dev_s

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if (priv->md_notify_registered)
{
priv->md_notify_event.sigev_value.sival_int = primitive->type;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard md_notify_event in mac802154_chardevice_s

else
{
status = nxsig_notification(_SCHED_GETPID(), sig,
SI_ASYNCIO, &aiocbp->aio_sigwork);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard in aiocb

*
****************************************************************************/

static int lio_sigsetup(FAR struct aiocb * const *list, int nent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does aio still work without signal? if not, we should diasable all aio functionality.

{
/* Save the notification events */

opriv->ao_notify.an_mount = notify->an_mount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does automount functionality still work

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if (priv->xd_notify_registered)
{
priv->xd_notify_event.sigev_value.sival_int = primitive->type;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard in xbeenet_driver_s too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Area: File System File System issues Area: Graphics Area: Networking Effects networking subsystem Area: OS Components OS Components issues Area: Sensors Sensors issues Size: M The size of the change in this PR is medium Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants