[Xenomai-git] Philippe Gerum : posix/timer: fix init upon NULL sigevent

2015-10-06 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: ae17d745e4a93e1e96d894a14ce294257201ed4e
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ae17d745e4a93e1e96d894a14ce294257201ed4e

Author: Philippe Gerum 
Date:   Mon Sep  7 14:52:59 2015 +0200

posix/timer: fix init upon NULL sigevent

---

 kernel/cobalt/posix/timer.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index e5551b3..8c4d2da 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -67,8 +67,10 @@ timer_init(struct cobalt_timer *timer,
timer->clockid != CLOCK_REALTIME)
return ERR_PTR(-EINVAL);
 
-   if (evp == NULL || evp->sigev_notify == SIGEV_NONE)
-   return owner;   /* Assume SIGEV_THREAD_ID. */
+   if (evp == NULL || evp->sigev_notify == SIGEV_NONE) {
+   target = owner; /* Assume SIGEV_THREAD_ID. */
+   goto init;
+   }
 
if (evp->sigev_notify != SIGEV_THREAD_ID)
return ERR_PTR(-EINVAL);
@@ -80,7 +82,7 @@ timer_init(struct cobalt_timer *timer,
target = cobalt_thread_find_local(evp->sigev_notify_thread_id);
if (target == NULL)
return ERR_PTR(-EINVAL);
-
+init:
/*
 * All standard clocks are based on the core clock, and we
 * want to deliver a signal when a timer elapses.


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : posix/timer: fix init upon NULL sigevent

2015-10-03 Thread git repository hosting
Module: xenomai-3
Branch: arm64
Commit: ae17d745e4a93e1e96d894a14ce294257201ed4e
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ae17d745e4a93e1e96d894a14ce294257201ed4e

Author: Philippe Gerum 
Date:   Mon Sep  7 14:52:59 2015 +0200

posix/timer: fix init upon NULL sigevent

---

 kernel/cobalt/posix/timer.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index e5551b3..8c4d2da 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -67,8 +67,10 @@ timer_init(struct cobalt_timer *timer,
timer->clockid != CLOCK_REALTIME)
return ERR_PTR(-EINVAL);
 
-   if (evp == NULL || evp->sigev_notify == SIGEV_NONE)
-   return owner;   /* Assume SIGEV_THREAD_ID. */
+   if (evp == NULL || evp->sigev_notify == SIGEV_NONE) {
+   target = owner; /* Assume SIGEV_THREAD_ID. */
+   goto init;
+   }
 
if (evp->sigev_notify != SIGEV_THREAD_ID)
return ERR_PTR(-EINVAL);
@@ -80,7 +82,7 @@ timer_init(struct cobalt_timer *timer,
target = cobalt_thread_find_local(evp->sigev_notify_thread_id);
if (target == NULL)
return ERR_PTR(-EINVAL);
-
+init:
/*
 * All standard clocks are based on the core clock, and we
 * want to deliver a signal when a timer elapses.


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : posix/timer: fix init upon NULL sigevent

2015-09-07 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: ae17d745e4a93e1e96d894a14ce294257201ed4e
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ae17d745e4a93e1e96d894a14ce294257201ed4e

Author: Philippe Gerum 
Date:   Mon Sep  7 14:52:59 2015 +0200

posix/timer: fix init upon NULL sigevent

---

 kernel/cobalt/posix/timer.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index e5551b3..8c4d2da 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -67,8 +67,10 @@ timer_init(struct cobalt_timer *timer,
timer->clockid != CLOCK_REALTIME)
return ERR_PTR(-EINVAL);
 
-   if (evp == NULL || evp->sigev_notify == SIGEV_NONE)
-   return owner;   /* Assume SIGEV_THREAD_ID. */
+   if (evp == NULL || evp->sigev_notify == SIGEV_NONE) {
+   target = owner; /* Assume SIGEV_THREAD_ID. */
+   goto init;
+   }
 
if (evp->sigev_notify != SIGEV_THREAD_ID)
return ERR_PTR(-EINVAL);
@@ -80,7 +82,7 @@ timer_init(struct cobalt_timer *timer,
target = cobalt_thread_find_local(evp->sigev_notify_thread_id);
if (target == NULL)
return ERR_PTR(-EINVAL);
-
+init:
/*
 * All standard clocks are based on the core clock, and we
 * want to deliver a signal when a timer elapses.


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git