-
Notifications
You must be signed in to change notification settings - Fork 1.5k
sched/signals: improvements for when all signals are disabled #17991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
c53b84a to
6b46448
Compare
When all signals are disabled, remove the altmdm_timer-related implementation and API definitions. Signed-off-by: Chengdong Wang <[email protected]>
6b46448 to
a1c1f12
Compare
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]>
a1c1f12 to
fb52bef
Compare
… 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]>
fb52bef to
286d12b
Compare
| /* Have any signal events occurred? */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| if ((press & opriv->bo_notify.bn_press) != 0 || |
There was a problem hiding this comment.
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 || |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
Summary
THis PR includes below three updates:
sleep()andusleep()to usenxsched_nanosleep()when all signals are disabled, so when all signals are disabled, sleep function can still be available and ostest can passpthread_kill()andpthread_sigmask()implementations when all signals are disabled, since these two functions rely on signalsImpact
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