From e4069ebe5e37cac257e3790135b474f7371468d2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 3 Jun 2019 08:12:20 -0600 Subject: [PATCH] include/nuttx/signal.h: Fix a C89 compliance problem that cause the ez80 build to fail. Empty structure and unions are not accepted by the compiler. --- include/nuttx/signal.h | 5 ++--- sched/signal/sig_notification.c | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h index be6841abb3..99dcf858ee 100644 --- a/include/nuttx/signal.h +++ b/include/nuttx/signal.h @@ -63,11 +63,9 @@ 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 }; /**************************************************************************** @@ -469,7 +467,8 @@ int nxsig_usleep(useconds_t usec); * event - The instance of struct sigevent that describes how to signal * the client. * code - Source: SI_USER, SI_QUEUE, SI_TIMER, SI_ASYNCIO, or SI_MESGQ - * work - The work structure to queue + * work - The work structure to queue. Must be non-NULL if + * event->sigev_notify == SIGEV_THREAD * * Returned Value: * This is an internal OS interface and should not be used by applications. diff --git a/sched/signal/sig_notification.c b/sched/signal/sig_notification.c index fa3edb76d9..9067e7220d 100644 --- a/sched/signal/sig_notification.c +++ b/sched/signal/sig_notification.c @@ -92,7 +92,7 @@ static void nxsig_notification_worker(FAR void *arg) * Name: nxsig_notification * * Description: - * Notify a client an event via either a singal or function call + * Notify a client an event via either a signal or function call * base on the sigev_notify field. * * Input Parameters: @@ -100,7 +100,8 @@ static void nxsig_notification_worker(FAR void *arg) * event - The instance of struct sigevent that describes how to signal * the client. * code - Source: SI_USER, SI_QUEUE, SI_TIMER, SI_ASYNCIO, or SI_MESGQ - * work - The work structure to queue + * work - The work structure to queue. Must be non-NULL if + * event->sigev_notify == SIGEV_THREAD * * Returned Value: * This is an internal OS interface and should not be used by applications.