Module: xenomai-3
Branch: stable-3.0.x
Commit: 406740bd47571f83f885665eb1685a11b4ea707c
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=406740bd47571f83f885665eb1685a11b4ea707c

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Apr 11 09:29:13 2018 +0200

drivers/udd: fix documentation

---

 include/cobalt/kernel/rtdm/udd.h |   18 +++++++++++-------
 lib/cobalt/init.c                |    1 +
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/include/cobalt/kernel/rtdm/udd.h b/include/cobalt/kernel/rtdm/udd.h
index aa9e838..550ba9d 100644
--- a/include/cobalt/kernel/rtdm/udd.h
+++ b/include/cobalt/kernel/rtdm/udd.h
@@ -147,20 +147,24 @@
  * @endcode
  *
  * This will make such region accessible via the mapper device using
- * the following sequence of code, via the default ->mmap() handler
- * from the UDD core:
+ * the following sequence of code (see note), via the default
+ * ->mmap() handler from the UDD core:
  *
  * @code
  * int fd, fdm;
  * void *p;
  *
- * fd = open("/dev/foocard", O_RDWR);
- * fdm = open("/dev/foocard,mapper@2", O_RDWR);
- * p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, 0, fdm, 0);
+ * fd = open("/dev/rtdm/foocard", O_RDWR);
+ * fdm = open("/dev/rtdm/foocard,mapper2", O_RDWR);
+ * p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fdm, 0);
  * @endcode
  *
- * @note No mapper device is created unless a valid region has been
- * declared in the udd_device.mem_regions[] array.
+ * if no valid region has been declared in the
+ * udd_device.mem_regions[] array, no mapper device is created.
+ *
+ * @note The example code assumes that @ref cobalt_api POSIX symbol
+ * wrapping is in effect, so that RTDM performs the memory mapping
+ * operation (not the regular kernel).
  */
 struct udd_memregion {
        /** Name of the region (informational but required) */
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index 0c73ef0..92ce45a 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -40,6 +40,7 @@
 /**
  * @ingroup cobalt
  * @defgroup cobalt_api POSIX interface
+ * @anchor cobalt_api
  *
  * The Cobalt/POSIX interface is an implementation of a subset of the
  * <a href="http://www.opengroup.org/onlinepubs/000095399/functions/";>


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

Reply via email to