Skip to content

Commit

Permalink
sched/signal: Fix compilation errors for MSVC.
Browse files Browse the repository at this point in the history
VELAPLATFO-43345

This commit removed empty struct to fix compilation errors for the MSVC compiler.

Change-Id: Iab09ef3eca1f59caa240304602847901e2bca8cf
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
  • Loading branch information
Fix-Point committed Oct 8, 2024
1 parent e9ea9f3 commit 7368b0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions include/nuttx/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

#ifdef __cplusplus
Expand Down Expand Up @@ -640,7 +638,7 @@ int nxsig_notification(pid_t pid, FAR struct sigevent *event,
#ifdef CONFIG_SIG_EVTHREAD
void nxsig_cancel_notification(FAR struct sigwork_s *work);
#else
# define nxsig_cancel_notification(work) (void)(work)
# define nxsig_cancel_notification(work)
#endif

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions sched/timer/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ struct posix_timer_s
clock_t pt_expected; /* Expected absolute time */
struct wdog_s pt_wdog; /* The watchdog that provides the timing */
struct sigevent pt_event; /* Notification information */
#ifdef CONFIG_SIG_EVTHREAD
struct sigwork_s pt_work;
#endif
};

/****************************************************************************
Expand Down
5 changes: 5 additions & 0 deletions sched/timer/timer_settime.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ static void timer_timeout(wdparm_t itimer);

static inline void timer_signotify(FAR struct posix_timer_s *timer)
{
#ifdef CONFIG_SIG_EVTHREAD
DEBUGVERIFY(nxsig_notification(timer->pt_owner, &timer->pt_event,
SI_TIMER, &timer->pt_work));
#else
DEBUGVERIFY(nxsig_notification(timer->pt_owner, &timer->pt_event,
SI_TIMER, NULL));
#endif
}

/****************************************************************************
Expand Down

0 comments on commit 7368b0f

Please sign in to comment.