Module: xenomai-3
Branch: stable-3.0.x
Commit: 2aeb9cdac3ada570b8765e0b8e5a2587dcbea98d
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2aeb9cdac3ada570b8765e0b8e5a2587dcbea98d

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jan 13 19:31:23 2016 +0100

cobalt/kernel: Fix invalidation of cond shadow

pthread_cond_destroy fails to invalidate also the shadow object. This
can cause spurious -EBUSY errors on re-initialization of the very same
shadow as condition variable later on.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/posix/cond.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/cobalt/posix/cond.c b/kernel/cobalt/posix/cond.c
index 7e115cf..84ae8fd 100644
--- a/kernel/cobalt/posix/cond.c
+++ b/kernel/cobalt/posix/cond.c
@@ -117,6 +117,8 @@ static inline int pthread_cond_destroy(struct 
cobalt_cond_shadow *cnd)
 
        cobalt_cond_reclaim(&cond->resnode, s); /* drops lock */
 
+       cobalt_mark_deleted(cnd);
+
        return 0;
 }
 


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

Reply via email to