-
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?
Changes from all commits
2eee6d6
bbe382b
9edfb0d
099466c
deae676
e887f02
a1c9938
b7ccd2c
2bd341e
295e747
17473f1
e0889a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,9 +85,11 @@ struct btn_open_s | |
|
|
||
| /* Button event notification information */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| pid_t bo_pid; | ||
| struct btn_notify_s bo_notify; | ||
| struct sigwork_s bo_work; | ||
| #endif | ||
|
|
||
| /* Poll event information */ | ||
|
|
||
|
|
@@ -297,6 +299,7 @@ static void btn_sample(wdparm_t arg) | |
|
|
||
| /* Have any signal events occurred? */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| if ((press & opriv->bo_notify.bn_press) != 0 || | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nee d remove from btn_open_s
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| (release & opriv->bo_notify.bn_release) != 0) | ||
| { | ||
|
|
@@ -306,6 +309,7 @@ static void btn_sample(wdparm_t arg) | |
| nxsig_notification(opriv->bo_pid, &opriv->bo_notify.bn_event, | ||
xiaoxiang781216 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| SI_QUEUE, &opriv->bo_work); | ||
| } | ||
| #endif | ||
| } | ||
|
|
||
| priv->bu_sample = sample; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,9 +84,11 @@ struct djoy_open_s | |
|
|
||
| /* Joystick event notification information */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| pid_t do_pid; | ||
| struct djoy_notify_s do_notify; | ||
| struct sigwork_s do_work; | ||
| #endif | ||
|
|
||
| /* Poll event information */ | ||
|
|
||
|
|
@@ -172,9 +174,10 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv) | |
| release |= opriv->do_pollevents.dp_release; | ||
|
|
||
| /* OR in the signal events */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| press |= opriv->do_notify.dn_press; | ||
| release |= opriv->do_notify.dn_release; | ||
| #endif | ||
| } | ||
|
|
||
| /* Enable/disable button interrupts */ | ||
|
|
@@ -271,6 +274,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv) | |
|
|
||
| /* Have any signal events occurred? */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| if ((press & opriv->do_notify.dn_press) != 0 || | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need remove from djoy_open_s
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| (release & opriv->do_notify.dn_release) != 0) | ||
| { | ||
|
|
@@ -280,6 +284,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv) | |
| nxsig_notification(opriv->do_pid, &opriv->do_notify.dn_event, | ||
| SI_QUEUE, &opriv->do_work); | ||
| } | ||
| #endif | ||
| } | ||
|
|
||
| priv->du_sample = sample; | ||
|
|
@@ -541,6 +546,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) | |
| * failure with the errno value set appropriately. | ||
| */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| case DJOYIOC_REGISTER: | ||
| { | ||
| FAR struct djoy_notify_s *notify = | ||
|
|
@@ -562,6 +568,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) | |
| } | ||
| } | ||
| break; | ||
| #endif | ||
|
|
||
| default: | ||
| ierr("ERROR: Unrecognized command: %d\n", cmd); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,6 +258,11 @@ static int ft80x_fade(FAR struct ft80x_dev_s *priv, | |
| static void ft80x_notify(FAR struct ft80x_dev_s *priv, | ||
| enum ft80x_notify_e id, int value) | ||
| { | ||
| #ifdef CONFIG_DISABLE_ALL_SIGNALS | ||
| UNUSED(priv); | ||
| UNUSED(id); | ||
| UNUSED(value); | ||
| #else | ||
| FAR struct ft80x_eventinfo_s *info = &priv->notify[id]; | ||
|
|
||
| /* Are notifications enabled for this event? */ | ||
|
|
@@ -271,6 +276,7 @@ static void ft80x_notify(FAR struct ft80x_dev_s *priv, | |
| info->event.sigev_value.sival_int = value; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need guard event in ft80x_dev_s
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| nxsig_notification(info->pid, &info->event, SI_QUEUE, &info->work); | ||
| } | ||
| #endif | ||
| } | ||
|
|
||
| /**************************************************************************** | ||
|
|
@@ -997,6 +1003,7 @@ static int ft80x_ioctl(FAR struct file *filep, int cmd, unsigned long arg) | |
| * Returns: None | ||
| */ | ||
|
|
||
| #ifndef CONFIG_DISABLE_ALL_SIGNALS | ||
| case FT80X_IOC_EVENTNOTIFY: | ||
| { | ||
| FAR struct ft80x_notify_s *notify = | ||
|
|
@@ -1059,7 +1066,7 @@ static int ft80x_ioctl(FAR struct file *filep, int cmd, unsigned long arg) | |
| } | ||
| } | ||
| break; | ||
|
|
||
| #endif | ||
| /* FT80X_IOC_FADE: | ||
| * Description: Change the backlight intensity with a controllable | ||
| * fade. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.