[Xenomai-git] Philippe Gerum : cobalt/kernel: unify naming of extern data - cobalt_nrthreads

2015-03-24 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 7f9a31af78677bef3257e69c21ebbea3f9176b8d
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7f9a31af78677bef3257e69c21ebbea3f9176b8d

Author: Philippe Gerum 
Date:   Tue Feb 17 11:40:45 2015 +0100

cobalt/kernel: unify naming of extern data - cobalt_nrthreads

---

 include/cobalt/kernel/sched.h |2 +-
 kernel/cobalt/sched.c |8 
 kernel/cobalt/thread.c|   14 +++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index 286db0f..04bd6ea 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -121,7 +121,7 @@ extern cpumask_t nkaffinity;
 
 extern struct list_head nkthreadq;
 
-extern int nknrthreads;
+extern int cobalt_nrthreads;
 
 #ifdef CONFIG_XENO_OPT_VFILE
 extern struct xnvfile_rev_tag nkthreadlist_tag;
diff --git a/kernel/cobalt/sched.c b/kernel/cobalt/sched.c
index bffb22a..ecdd3ca 100644
--- a/kernel/cobalt/sched.c
+++ b/kernel/cobalt/sched.c
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(nkaffinity);
 
 LIST_HEAD(nkthreadq);
 
-int nknrthreads;
+int cobalt_nrthreads;
 
 #ifdef CONFIG_XENO_OPT_VFILE
 struct xnvfile_rev_tag nkthreadlist_tag;
@@ -209,7 +209,7 @@ void xnsched_init(struct xnsched *sched, int cpu)
 
xnthread_init_root_tcb(&sched->rootcb);
list_add_tail(&sched->rootcb.glink, &nkthreadq);
-   nknrthreads++;
+   cobalt_nrthreads++;
 
 #ifdef CONFIG_XENO_OPT_WATCHDOG
xntimer_init(&sched->wdtimer, &nkclock, watchdog_handler,
@@ -943,7 +943,7 @@ static int vfile_schedlist_rewind(struct 
xnvfile_snapshot_iterator *it)
priv->curr = list_first_entry(&nkthreadq, struct xnthread, glink);
priv->start_time = xnclock_read_monotonic(&nkclock);
 
-   return nknrthreads;
+   return cobalt_nrthreads;
 }
 
 static int vfile_schedlist_next(struct xnvfile_snapshot_iterator *it,
@@ -1103,7 +1103,7 @@ static int vfile_schedstat_rewind(struct 
xnvfile_snapshot_iterator *it)
priv->irq = 0;
irqnr = xnintr_query_init(&priv->intr_it) * NR_CPUS;
 
-   return irqnr + nknrthreads;
+   return irqnr + cobalt_nrthreads;
 }
 
 static int vfile_schedstat_next(struct xnvfile_snapshot_iterator *it,
diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 91af8ad..4018d7c 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -436,7 +436,7 @@ static inline void cleanup_tcb(struct xnthread *thread) /* 
nklock held, irqs off
struct xnsched *sched = thread->sched;
 
list_del(&thread->glink);
-   nknrthreads--;
+   cobalt_nrthreads--;
xnvfile_touch_tag(&nkthreadlist_tag);
 
if (xnthread_test_state(thread, XNREADY)) {
@@ -507,7 +507,7 @@ void __xnthread_discard(struct xnthread *thread)
 
xnlock_get_irqsave(&nklock, s);
list_del(&thread->glink);
-   nknrthreads--;
+   cobalt_nrthreads--;
xnvfile_touch_tag(&nkthreadlist_tag);
xnthread_deregister(thread);
xnlock_put_irqrestore(&nklock, s);
@@ -608,7 +608,7 @@ int xnthread_init(struct xnthread *thread,
 
xnlock_get_irqsave(&nklock, s);
list_add_tail(&thread->glink, &nkthreadq);
-   nknrthreads++;
+   cobalt_nrthreads++;
xnvfile_touch_tag(&nkthreadlist_tag);
xnlock_put_irqrestore(&nklock, s);
 
@@ -2472,7 +2472,7 @@ int xnthread_killall(int grace, int mask)
 */
xnlock_get_irqsave(&nklock, s);
 
-   nrthreads = nknrthreads;
+   nrthreads = cobalt_nrthreads;

xnsched_for_each_thread(t) {
if (xnthread_test_state(t, XNROOT) ||
@@ -2502,17 +2502,17 @@ int xnthread_killall(int grace, int mask)
 
if (grace > 0) {
ret = wait_event_interruptible_timeout(nkjoinq,
-  nknrthreads == count,
+  cobalt_nrthreads == 
count,
   grace * HZ);
if (ret == 0)
return -EAGAIN;
} else
ret = wait_event_interruptible(nkjoinq,
-  nknrthreads == count);
+  cobalt_nrthreads == count);
 
if (XENO_DEBUG(COBALT))
printk(XENO_INFO "joined %d threads\n",
-  count + nrkilled - nknrthreads);
+  count + nrkilled - cobalt_nrthreads);
 
return ret < 0 ? EINTR : 0;
 }


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


[Xenomai-git] Philippe Gerum : cobalt/kernel: unify naming of extern data - cobalt_nrthreads

2015-02-17 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 7f9a31af78677bef3257e69c21ebbea3f9176b8d
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7f9a31af78677bef3257e69c21ebbea3f9176b8d

Author: Philippe Gerum 
Date:   Tue Feb 17 11:40:45 2015 +0100

cobalt/kernel: unify naming of extern data - cobalt_nrthreads

---

 include/cobalt/kernel/sched.h |2 +-
 kernel/cobalt/sched.c |8 
 kernel/cobalt/thread.c|   14 +++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index 286db0f..04bd6ea 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -121,7 +121,7 @@ extern cpumask_t nkaffinity;
 
 extern struct list_head nkthreadq;
 
-extern int nknrthreads;
+extern int cobalt_nrthreads;
 
 #ifdef CONFIG_XENO_OPT_VFILE
 extern struct xnvfile_rev_tag nkthreadlist_tag;
diff --git a/kernel/cobalt/sched.c b/kernel/cobalt/sched.c
index bffb22a..ecdd3ca 100644
--- a/kernel/cobalt/sched.c
+++ b/kernel/cobalt/sched.c
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(nkaffinity);
 
 LIST_HEAD(nkthreadq);
 
-int nknrthreads;
+int cobalt_nrthreads;
 
 #ifdef CONFIG_XENO_OPT_VFILE
 struct xnvfile_rev_tag nkthreadlist_tag;
@@ -209,7 +209,7 @@ void xnsched_init(struct xnsched *sched, int cpu)
 
xnthread_init_root_tcb(&sched->rootcb);
list_add_tail(&sched->rootcb.glink, &nkthreadq);
-   nknrthreads++;
+   cobalt_nrthreads++;
 
 #ifdef CONFIG_XENO_OPT_WATCHDOG
xntimer_init(&sched->wdtimer, &nkclock, watchdog_handler,
@@ -943,7 +943,7 @@ static int vfile_schedlist_rewind(struct 
xnvfile_snapshot_iterator *it)
priv->curr = list_first_entry(&nkthreadq, struct xnthread, glink);
priv->start_time = xnclock_read_monotonic(&nkclock);
 
-   return nknrthreads;
+   return cobalt_nrthreads;
 }
 
 static int vfile_schedlist_next(struct xnvfile_snapshot_iterator *it,
@@ -1103,7 +1103,7 @@ static int vfile_schedstat_rewind(struct 
xnvfile_snapshot_iterator *it)
priv->irq = 0;
irqnr = xnintr_query_init(&priv->intr_it) * NR_CPUS;
 
-   return irqnr + nknrthreads;
+   return irqnr + cobalt_nrthreads;
 }
 
 static int vfile_schedstat_next(struct xnvfile_snapshot_iterator *it,
diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 91af8ad..4018d7c 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -436,7 +436,7 @@ static inline void cleanup_tcb(struct xnthread *thread) /* 
nklock held, irqs off
struct xnsched *sched = thread->sched;
 
list_del(&thread->glink);
-   nknrthreads--;
+   cobalt_nrthreads--;
xnvfile_touch_tag(&nkthreadlist_tag);
 
if (xnthread_test_state(thread, XNREADY)) {
@@ -507,7 +507,7 @@ void __xnthread_discard(struct xnthread *thread)
 
xnlock_get_irqsave(&nklock, s);
list_del(&thread->glink);
-   nknrthreads--;
+   cobalt_nrthreads--;
xnvfile_touch_tag(&nkthreadlist_tag);
xnthread_deregister(thread);
xnlock_put_irqrestore(&nklock, s);
@@ -608,7 +608,7 @@ int xnthread_init(struct xnthread *thread,
 
xnlock_get_irqsave(&nklock, s);
list_add_tail(&thread->glink, &nkthreadq);
-   nknrthreads++;
+   cobalt_nrthreads++;
xnvfile_touch_tag(&nkthreadlist_tag);
xnlock_put_irqrestore(&nklock, s);
 
@@ -2472,7 +2472,7 @@ int xnthread_killall(int grace, int mask)
 */
xnlock_get_irqsave(&nklock, s);
 
-   nrthreads = nknrthreads;
+   nrthreads = cobalt_nrthreads;

xnsched_for_each_thread(t) {
if (xnthread_test_state(t, XNROOT) ||
@@ -2502,17 +2502,17 @@ int xnthread_killall(int grace, int mask)
 
if (grace > 0) {
ret = wait_event_interruptible_timeout(nkjoinq,
-  nknrthreads == count,
+  cobalt_nrthreads == 
count,
   grace * HZ);
if (ret == 0)
return -EAGAIN;
} else
ret = wait_event_interruptible(nkjoinq,
-  nknrthreads == count);
+  cobalt_nrthreads == count);
 
if (XENO_DEBUG(COBALT))
printk(XENO_INFO "joined %d threads\n",
-  count + nrkilled - nknrthreads);
+  count + nrkilled - cobalt_nrthreads);
 
return ret < 0 ? EINTR : 0;
 }


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