Module: xenomai-3
Branch: master
Commit: e4389c53222c455a73a9e5059669b77a375674ea
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e4389c53222c455a73a9e5059669b77a375674ea

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Oct 16 18:16:32 2015 +0200

lib/cobalt: Introduce cobalt_thread_probe

This will be used by copperplate for probing a RT thread without
risking to be switched to secondary mode.

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

---

 lib/cobalt/internal.c |    5 +++++
 lib/cobalt/internal.h |    2 ++
 2 files changed, 7 insertions(+)

diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index 210d259..9220237 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -117,6 +117,11 @@ int cobalt_thread_join(pthread_t thread)
        return ret;
 }
 
+int cobalt_thread_probe(pid_t pid)
+{
+       return XENOMAI_SYSCALL2(sc_cobalt_kill, pid, 0);
+}
+
 void __cobalt_commit_memory(void *p, size_t len)
 {
        volatile char *_p = (volatile char *)p, *end;
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index 4f03cf0..69ec7d1 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -45,6 +45,8 @@ static inline atomic_t *mutex_get_ownerp(struct 
cobalt_mutex_shadow *shadow)
 
 void cobalt_thread_init(void);
 
+int cobalt_thread_probe(pid_t pid);
+
 void cobalt_print_init(void);
 
 void cobalt_print_init_atfork(void);


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

Reply via email to