sched/signal: Add ifdef macro to reduce the bss size.

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 <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2024-09-23 09:29:57 +08:00 committed by archer
parent c6861ea931
commit 56bcc3bb12

View File

@ -63,9 +63,11 @@
struct sigwork_s struct sigwork_s
{ {
#ifdef CONFIG_SIG_EVTHREAD
struct work_s work; /* Work queue structure */ struct work_s work; /* Work queue structure */
union sigval value; /* Data passed with notification */ union sigval value; /* Data passed with notification */
sigev_notify_function_t func; /* Notification function */ sigev_notify_function_t func; /* Notification function */
#endif
}; };
#ifdef __cplusplus #ifdef __cplusplus