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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Sep  9 17:51:37 2009 +0200

nucleus: inline xnmap_fetch service

---

 include/nucleus/map.h |   11 +++++++++--
 ksrc/nucleus/map.c    |   11 -----------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/include/nucleus/map.h b/include/nucleus/map.h
index b22be2a..08b302d 100644
--- a/include/nucleus/map.h
+++ b/include/nucleus/map.h
@@ -57,8 +57,15 @@ int xnmap_enter(xnmap_t *map,
 int xnmap_remove(xnmap_t *map,
                 int key);
 
-void *xnmap_fetch(xnmap_t *map,
-                 int key);
+static inline void *xnmap_fetch(xnmap_t *map, int key)
+{
+       int ofkey = key - map->offset;
+
+       if (ofkey < 0 || ofkey >= map->nkeys)
+               return NULL;
+
+       return map->objarray[ofkey];
+}
 
 /*...@}*/
 
diff --git a/ksrc/nucleus/map.c b/ksrc/nucleus/map.c
index 12d2957..9126890 100644
--- a/ksrc/nucleus/map.c
+++ b/ksrc/nucleus/map.c
@@ -294,15 +294,4 @@ EXPORT_SYMBOL_GPL(xnmap_remove);
  * Rescheduling: never.
  */
 
-void *xnmap_fetch(xnmap_t *map, int key)
-{
-       int ofkey = key - map->offset;
-
-       if (ofkey < 0 || ofkey >= map->nkeys)
-               return NULL;
-
-       return map->objarray[ofkey];
-}
-EXPORT_SYMBOL(xnmap_fetch);
-
 /*...@}*/


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to