Skip to content

Commit

Permalink
sched/signal: Add ifdef macro to reduce the bss size.
Browse files Browse the repository at this point in the history
This commit added ifdef macro to sigwork_s. When CONFIG_SIG_EVTHREAD is
not defined, the struct sigwork_s will be empty struct, which is helpful
to reduce bss size.

Signed-off-by: ouyangxiangzhen <[email protected]>
  • Loading branch information
Fix-Point committed Sep 23, 2024
1 parent 5baac79 commit 903d522
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/nuttx/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@

struct sigwork_s
{
#ifdef CONFIG_SIG_EVTHREAD
struct work_s work; /* Work queue structure */
union sigval value; /* Data passed with notification */
sigev_notify_function_t func; /* Notification function */
#endif
};

#ifdef __cplusplus
Expand Down

0 comments on commit 903d522

Please sign in to comment.