Module: xenomai-forge
Branch: next
Commit: 1133ed60e7fc0feb7480c45d227b47f17d1a75a4
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1133ed60e7fc0feb7480c45d227b47f17d1a75a4

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jan 20 16:06:10 2014 +0100

cobalt/posix/timer: prefer non-atomic bitops when applicable

---

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

diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index 6c5994f..e38ed3d 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -98,19 +98,20 @@ timer_init(struct cobalt_timer *timer,
 
 static inline int timer_alloc_id(struct cobalt_process *cc)
 {
-       unsigned id;
+       int id;
 
        id = find_first_bit(cc->timers_map, CONFIG_XENO_OPT_NRTIMERS);
        if (id == CONFIG_XENO_OPT_NRTIMERS)
                return -EAGAIN;
 
-       clear_bit(id, cc->timers_map);
+       __clear_bit(id, cc->timers_map);
+
        return id;
 }
 
 static inline void timer_free_id(struct cobalt_process *cc, int id)
 {
-       set_bit(id, cc->timers_map);
+       __set_bit(id, cc->timers_map);
 }
 
 struct cobalt_timer *


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

Reply via email to