This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 56bcc3bb1223d806178736238ae0a7f382a4d794
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Mon Sep 23 09:29:57 2024 +0800

    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 <[email protected]>
---
 include/nuttx/signal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h
index 875cba4042..cd52a9d1e0 100644
--- a/include/nuttx/signal.h
+++ b/include/nuttx/signal.h
@@ -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

Reply via email to