[API-NEXT,v1,1/1] linux-gen: timer: set sigev_value in timer_res_init

Message ID 1501534805-19575-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [API-NEXT,v1,1/1] linux-gen: timer: set sigev_value in timer_res_init
Related show

Commit Message

Github ODP bot July 31, 2017, 9 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Even if signal is never to be delivered, it is still required to set
sigev_value in sigevent structure.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 97 (lumag:fix-timer)
 ** https://github.com/Linaro/odp/pull/97
 ** Patch: https://github.com/Linaro/odp/pull/97.patch
 ** Base sha: c16f1363303cd5fc11324acbc4dfebe0a9680a41
 ** Merge commit sha: ea7b41a7000a484c886c3e19b3fad877968417ac
 **/
 platform/linux-generic/odp_timer.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c
index 9fc0675d..fdb48902 100644
--- a/platform/linux-generic/odp_timer.c
+++ b/platform/linux-generic/odp_timer.c
@@ -844,6 +844,7 @@  static int timer_res_init(void)
 
 	sigev.sigev_notify = SIGEV_THREAD_ID;
 	sigev._sigev_un._tid = (pid_t)syscall(SYS_gettid);
+	sigev.sigev_value.sival_ptr = NULL;
 	sigev.sigev_signo = SIGUSR1;
 
 	/* Create timer */