Skip to contentSkip to conversation

RTDM: refactor and document select API extension

PATCH In review Jan Kiszka 2 participants 2 messages Mar 28, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 RTDM: refactor and document select API extension

Hi Gilles,

unfortunately I missed (or more likely forgot) that the RTDM select extensions already made it into stable and thus now also into a release. However, here is an overdue cleanup and documentation patch. Please check if I happen to have written nonsense or broke something (only compile-tested). Don't hesitate to suggest better names for types, fields etc. if you find any.

Thanks,
Jan

---
 ChangeLog                      |    5 +
 doc/doxygen/Doxyfile-common.in |    1 
 include/rtdm/rtdm.h            |    8 -
 include/rtdm/rtdm_driver.h     |   67 +++++++++++-----
 ksrc/skins/posix/syscall.c     |    7 -
 ksrc/skins/rtdm/core.c         |   84 +++++++++++++-------
 ksrc/skins/rtdm/drvlib.c       |  169 ++++++++++++++++++++++++++++-------------
 7 files changed, 234 insertions(+), 107 deletions(-)
include/rtdm/rtdm.h +2 -6
Index: b/include/rtdm/rtdm.h
===================================================================
@@ -31,7 +31,7 @@
  * RT/non-RT systems like Xenomai. RTDM conforms to POSIX
  * semantics (IEEE Std 1003.1) where available and applicable.
  *
- * @b API @b Revision: 6
+ * @b API @b Revision: 7
  */
 
 /*!
@@ -75,7 +75,7 @@ typedef struct task_struct rtdm_user_inf
  * @anchor api_versioning @name API Versioning
  * @{ */
 /** Common user and driver API version */
-#define RTDM_API_VER			6
+#define RTDM_API_VER			7
 
 /** Minimum API revision compatible with the current release */
 #define RTDM_API_MIN_COMPAT_VER		6
@@ -247,10 +247,6 @@ ssize_t __rt_dev_recvmsg(rtdm_user_info_
 			 struct msghdr *msg, int flags);
 ssize_t __rt_dev_sendmsg(rtdm_user_info_t *user_info, int fd,
 			 const struct msghdr *msg, int flags);
-struct xnselector;
-int __rt_dev_select_bind(rtdm_user_info_t *user_info, int fd,
-			 struct xnselector *selector,
-			 unsigned type, unsigned index);
 #endif /* __KERNEL__ */
 
 /* Define RTDM_NO_DEFAULT_USER_API to switch off the default rt_dev_xxx
include/rtdm/rtdm_driver.h +49 -18

129 lines not on this page · raw message

ksrc/skins/posix/syscall.c +3 -4
Index: b/ksrc/skins/posix/syscall.c
===================================================================
@@ -1922,11 +1922,10 @@ static int select_bind_one(struct xnsele
 	pse51_assoc_t *assoc;
 #if defined(CONFIG_XENO_SKIN_RTDM) || defined (CONFIG_XENO_SKIN_RTDM_MODULE)
 	const int rtdm_fd_start = FD_SETSIZE - RTDM_FD_MAX;
-	
+
 	if (fd >= rtdm_fd_start)
-		return __rt_dev_select_bind(current,
-					    fd - rtdm_fd_start,
-					    selector, type, fd);
+		return rtdm_select_bind(fd - rtdm_fd_start,
+					selector, type, fd);
 #endif /* CONFIG_XENO_SKIN_RTDM */
 
 	assoc = pse51_assoc_lookup(&pse51_queues()->uqds, fd);
ksrc/skins/rtdm/core.c +56 -28

96 lines not on this page · raw message

ksrc/skins/rtdm/drvlib.c +118 -51

205 lines not on this page · raw message

doc/doxygen/Doxyfile-common.in +1 -0
Index: b/doc/doxygen/Doxyfile-common.in
===================================================================
@@ -691,6 +691,7 @@ PREDEFINED             = DOXYGEN_CPP \
         CONFIG_XENO_OPT_RTAI_FIFO \
         CONFIG_XENO_OPT_RTAI_SEM \
         CONFIG_XENO_OPT_RTAI_SHM \
+        CONFIG_XENO_OPT_RTDM_SELECT \
         CONFIG_GENERIC_CLOCKEVENTS
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
ChangeLog +5 -0
Index: b/ChangeLog
===================================================================
@@ -1,3 +1,8 @@
+2008-03-28  Jan Kiszka  <[email protected]>
+
+	* include/rtdm, ksrc/skins/rtdm: Refactor and document select API.
+	Finally increment API version.
+
 2008-03-24  Stephane Fillod  <[email protected]>
 
 	* ksrc/skins/native/heap.c: Output oustanding number of heap
#1 lore raw
Quoted 5 lines · Jan Kiszka

Hi Gilles,

unfortunately I missed (or more likely forgot) that the RTDM select extensions already made it into stable and thus now also into a release.

My bad, I did not tell publically that I was going to do it.

Quoted 4 lines

However, here is an overdue cleanup and documentation patch. Please check if I happen to have written nonsense or broke something (only compile-tested). Don't hesitate to suggest better names for types, fields etc. if you find any.

I am Ok with the patch. Please commit.

Signature · 1 line
					    Gilles.