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

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

nucleus: introduce xnmap_fetch_nocheck service

---

 include/nucleus/map.h |    6 ++++++
 ksrc/nucleus/map.c    |   27 +++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/include/nucleus/map.h b/include/nucleus/map.h
index 08b302d..b9ec1c7 100644
--- a/include/nucleus/map.h
+++ b/include/nucleus/map.h
@@ -57,6 +57,12 @@ int xnmap_enter(xnmap_t *map,
 int xnmap_remove(xnmap_t *map,
                 int key);
 
+static inline void *xnmap_fetch_nocheck(xnmap_t *map, int key)
+{
+       int ofkey = key - map->offset;
+       return map->objarray[ofkey];
+}
+
 static inline void *xnmap_fetch(xnmap_t *map, int key)
 {
        int ofkey = key - map->offset;
diff --git a/ksrc/nucleus/map.c b/ksrc/nucleus/map.c
index 9126890..15e1590 100644
--- a/ksrc/nucleus/map.c
+++ b/ksrc/nucleus/map.c
@@ -294,4 +294,31 @@ EXPORT_SYMBOL_GPL(xnmap_remove);
  * Rescheduling: never.
  */
 
+/*!
+ * \fn void xnmap_fetch_nocheck(xnmap_t *map, int key)
+ * \brief Search an object into a map - unchecked form.
+ *
+ * Retrieve an object reference from the given map by its index key,
+ * but does not perform any sanity check on the provided key.
+ *
+ * @param map The address of the map to retrieve from.
+ *
+ * @param key The key to be searched for in the map index.
+ *
+ * @return The indexed object address is returned on success,
+ * otherwise NULL is returned when no object is currently indexed on
+ * @a key.
+ *
+ * Environments:
+ *
+ * This service can be called from:
+ *
+ * - Kernel module initialization/cleanup code
+ * - Interrupt service routine
+ * - Kernel-based task
+ * - User-space task
+ *
+ * Rescheduling: never.
+ */
+
 /*...@}*/


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

Reply via email to