Module: xenomai-3
Branch: master
Commit: 93a96753193d7b0953cf6580302e34f5bb62e19a
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=93a96753193d7b0953cf6580302e34f5bb62e19a

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Nov  9 11:59:35 2014 +0100

cobalt/kernel/rtdm: drop obsolete rt_dev API

The situation is now:

- the inter-driver API (i.e. kernel-based) consists of the set of
  rtdm_*() calls (e.g. rtdm_open(), rtdm_socket(), etc).

- the user-space API for talking to RTDM device drivers is the Cobalt
  implementaiton of the regular POSIX API (e.g. open, socket, read,
  write, sendmsg, recvmsg etc.), available from libcobalt.  libcobalt
  is implicitly available to all POSIX and non-POSIX applications in
  user-space, i.e. applications can use the Cobalt implementation of
  the regular POSIX I/O services regardless of their API of choice.

---

 include/cobalt/kernel/rtdm/driver.h |   23 -----
 include/cobalt/kernel/rtdm/rtdm.h   |  189 ++++++++++++++++++++++++++++-------
 kernel/cobalt/rtdm/core.c           |  134 ++++++++++++-------------
 3 files changed, 221 insertions(+), 125 deletions(-)

diff --git a/include/cobalt/kernel/rtdm/driver.h 
b/include/cobalt/kernel/rtdm/driver.h
index 6ef44b0..f705af2 100644
--- a/include/cobalt/kernel/rtdm/driver.h
+++ b/include/cobalt/kernel/rtdm/driver.h
@@ -362,29 +362,6 @@ int rtdm_dev_register(struct rtdm_device *device);
 
 void rtdm_dev_unregister(struct rtdm_device *device);
 
-/* --- inter-driver API --- */
-
-#define rtdm_open              rt_dev_open
-#define rtdm_socket            rt_dev_socket
-#define rtdm_close             rt_dev_close
-#define rtdm_ioctl             rt_dev_ioctl
-#define rtdm_read              rt_dev_read
-#define rtdm_write             rt_dev_write
-#define rtdm_recvmsg           rt_dev_recvmsg
-#define rtdm_recv              rt_dev_recv
-#define rtdm_recvfrom          rt_dev_recvfrom
-#define rtdm_sendmsg           rt_dev_sendmsg
-#define rtdm_send              rt_dev_send
-#define rtdm_sendto            rt_dev_sendto
-#define rtdm_bind              rt_dev_bind
-#define rtdm_listen            rt_dev_listen
-#define rtdm_accept            rt_dev_accept
-#define rtdm_getsockopt                rt_dev_getsockopt
-#define rtdm_setsockopt                rt_dev_setsockopt
-#define rtdm_getsockname       rt_dev_getsockname
-#define rtdm_getpeername       rt_dev_getpeername
-#define rtdm_shutdown          rt_dev_shutdown
-
 #ifndef DOXYGEN_CPP /* Avoid static inline tags for RTDM in doxygen */
 
 /* --- clock services --- */
diff --git a/include/cobalt/kernel/rtdm/rtdm.h 
b/include/cobalt/kernel/rtdm/rtdm.h
index 2b1c8fd..c6b0f84 100644
--- a/include/cobalt/kernel/rtdm/rtdm.h
+++ b/include/cobalt/kernel/rtdm/rtdm.h
@@ -28,58 +28,68 @@
 #include <cobalt/kernel/ppd.h>
 #include <rtdm/fd.h>
 
-typedef u32 socklen_t;
+typedef __u32 socklen_t;
+
+#include <rtdm/uapi/rtdm.h>
 
 int __rtdm_dev_open(const char *path, int oflag);
 
 int __rtdm_dev_socket(int protocol_family,
                      int socket_type, int protocol);
 
-/*
- * Define RTDM_NO_DEFAULT_USER_API to switch off the default
- * rt_dev_xxx interface when providing a customised user API.
- */
-#ifndef RTDM_NO_DEFAULT_USER_API
-
-#define rt_dev_open(path, oflag, ...)                          \
-       __rtdm_dev_open(path, oflag)
+static inline int rtdm_open(const char *path, int oflag, ...)
+{
+       return __rtdm_dev_open(path, oflag);
+}
 
-#define rt_dev_socket(protocol_family, socket_type, protocol)  \
-       __rtdm_dev_socket(protocol_family, socket_type, protocol)
+static inline int rtdm_socket(int protocol_family,
+                             int socket_type, int protocol)
+{
+       return __rtdm_dev_socket(protocol_family, socket_type, protocol);
+}
 
-#define rt_dev_close(fd)                                       \
-       rtdm_fd_close(fd, RTDM_FD_MAGIC)
+static inline int rtdm_close(int fd)
+{
+       return rtdm_fd_close(fd, RTDM_FD_MAGIC);
+}
 
-#define rt_dev_fcntl(fd, cmd, ...)                             \
-       rtdm_fd_fcntl(fd,cmd, __VA_ARGS__)
+#define rtdm_fcntl(__fd, __cmd, __args...)     \
+       rtdm_fd_fcntl(__fd, __cmd, ##__args)
 
-#define rt_dev_ioctl(fd, request, ...)                         \
-       rtdm_fd_ioctl(fd, request, __VA_ARGS__)
+#define rtdm_ioctl(__fd, __request, __args...) \
+       rtdm_fd_ioctl(__fd, __request, ##__args)
 
-#define rt_dev_read(fd, buf, nbyte)                            \
-       rtdm_fd_read(fd, buf, nbyte)
+static inline ssize_t rtdm_read(int fd, void *buf, size_t count)
+{
+       return rtdm_fd_read(fd, buf, count);
+}
 
-#define rt_dev_write(fd, buf, nbyte)                           \
-       rtdm_fd_write(fd, buf, nbyte)
+static inline ssize_t rtdm_write(int fd, const void *buf, size_t count)
+{
+       return rtdm_fd_write(fd, buf, count);
+}
 
-#define rt_dev_recvmsg(fd, msg, flags)                         \
-       rtdm_fd_recvmsg(fd, msg, flags)
+static inline ssize_t rtdm_recvmsg(int s, struct msghdr *msg, int flags)
+{
+       return rtdm_fd_recvmsg(s, msg, flags);
+}
 
-#define rt_dev_sendmsg(fd, msg, flags)                         \
-       rtdm_fd_sendmsg(fd, msg, flags)
+static inline ssize_t rtdm_sendmsg(int s, const struct msghdr *msg, int flags)
+{
+       return rtdm_fd_sendmsg(s, msg, flags);
+}
 
 static inline
-ssize_t rt_dev_recvfrom(int fd, void *buf, size_t len, int flags,
-                       struct sockaddr *from,
-                       socklen_t *fromlen)
+ssize_t rtdm_recvfrom(int s, void *buf, size_t len, int flags,
+                     struct sockaddr *from,
+                     socklen_t *fromlen)
 {
-       struct iovec iov;
        struct msghdr msg;
-       int ret;
+       struct iovec iov;
+       ssize_t ret;
 
        iov.iov_base = buf;
        iov.iov_len = len;
-
        msg.msg_name = from;
        msg.msg_namelen = from ? *fromlen : 0;
        msg.msg_iov = &iov;
@@ -87,14 +97,123 @@ ssize_t rt_dev_recvfrom(int fd, void *buf, size_t len, int 
flags,
        msg.msg_control = NULL;
        msg.msg_controllen = 0;
 
-       ret = rt_dev_recvmsg(fd, &msg, flags);
-       if (ret >= 0 && from)
+       ret = rtdm_recvmsg(s, &msg, flags);
+       if (ret < 0)
+               return ret;
+
+       if (from)
                *fromlen = msg.msg_namelen;
+
        return ret;
 }
 
-#endif /* !RTDM_NO_DEFAULT_USER_API */
+static inline ssize_t rtdm_recv(int s, void *buf, size_t len, int flags)
+{
+       return rtdm_recvfrom(s, buf, len, flags, NULL, NULL);
+}
 
-#include <rtdm/uapi/rtdm.h>
+static inline ssize_t rtdm_sendto(int s, const void *buf, size_t len,
+                                 int flags, const struct sockaddr *to,
+                                 socklen_t tolen)
+{
+       struct msghdr msg;
+       struct iovec iov;
+
+       iov.iov_base = (void *)buf;
+       iov.iov_len = len;
+       msg.msg_name = (struct sockaddr *)to;
+       msg.msg_namelen = tolen;
+       msg.msg_iov = &iov;
+       msg.msg_iovlen = 1;
+       msg.msg_control = NULL;
+       msg.msg_controllen = 0;
+
+       return rtdm_sendmsg(s, &msg, flags);
+}
+
+static inline ssize_t rtdm_send(int s, const void *buf, size_t len, int flags)
+{
+       return rtdm_sendto(s, buf, len, flags, NULL, 0);
+}
+
+static inline int rtdm_getsockopt(int s, int level, int optname,
+                                 void *optval, socklen_t *optlen)
+{
+       struct _rtdm_getsockopt_args args = {
+               level, optname, optval, optlen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_GETSOCKOPT, &args);
+}
+
+static inline int rtdm_setsockopt(int s, int level, int optname,
+                                 const void *optval, socklen_t optlen)
+{
+       struct _rtdm_setsockopt_args args = {
+               level, optname, (void *)optval, optlen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_SETSOCKOPT, &args);
+}
+
+static inline int rtdm_bind(int s, const struct sockaddr *my_addr,
+                           socklen_t addrlen)
+{
+       struct _rtdm_setsockaddr_args args = {
+               my_addr, addrlen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_BIND, &args);
+}
+
+static inline int rtdm_connect(int s, const struct sockaddr *serv_addr,
+                              socklen_t addrlen)
+{
+       struct _rtdm_setsockaddr_args args = {
+               serv_addr, addrlen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_CONNECT, &args);
+}
+
+static inline int rtdm_listen(int s, int backlog)
+{
+       return rtdm_ioctl(s, _RTIOC_LISTEN, backlog);
+}
+
+static inline int rtdm_accept(int s, struct sockaddr *addr,
+                             socklen_t *addrlen)
+{
+       struct _rtdm_getsockaddr_args args = {
+               addr, addrlen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_ACCEPT, &args);
+}
+
+static inline int rtdm_getsockname(int s, struct sockaddr *name,
+                                  socklen_t *namelen)
+{
+       struct _rtdm_getsockaddr_args args = {
+               name, namelen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_GETSOCKNAME, &args);
+}
+
+static inline int rtdm_getpeername(int s, struct sockaddr *name,
+                                  socklen_t *namelen)
+{
+       struct _rtdm_getsockaddr_args args = {
+               name, namelen
+       };
+
+       return rtdm_ioctl(s, _RTIOC_GETPEERNAME, &args);
+}
+
+static inline int rtdm_shutdown(int s, int how)
+{
+       return rtdm_ioctl(s, _RTIOC_SHUTDOWN, how);
+}
 
 #endif /* _COBALT_RTDM_RTDM_H */
diff --git a/kernel/cobalt/rtdm/core.c b/kernel/cobalt/rtdm/core.c
index cdb0483..77cc335 100644
--- a/kernel/cobalt/rtdm/core.c
+++ b/kernel/cobalt/rtdm/core.c
@@ -705,7 +705,7 @@ rtdm_for_each_waiter_safe(rtdm_task_t pos, rtdm_task_t tmp, 
struct rtdm_wait_que
 /**
  * @brief Open a device
  *
- * Refer to rt_dev_open() for parameters and return values
+ * Refer to rtdm_open() for parameters and return values
  *
  * @coretags{secondary-only, might-switch}
  */
@@ -714,7 +714,7 @@ int rtdm_open(const char *path, int oflag, ...);
 /**
  * @brief Create a socket
  *
- * Refer to rt_dev_socket() for parameters and return values. Action
+ * Refer to rtdm_socket() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -725,7 +725,7 @@ int rtdm_socket(int protocol_family, int socket_type, int 
protocol);
 /**
  * @brief Close a device or socket
  *
- * Refer to rt_dev_close() for parameters and return values. Action
+ * Refer to rtdm_close() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -736,7 +736,7 @@ int rtdm_close(int fd);
 /**
  * @brief Issue an IOCTL
  *
- * Refer to rt_dev_ioctl() for parameters and return values. Action
+ * Refer to rtdm_ioctl() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -747,7 +747,7 @@ int rtdm_ioctl(int fd, int request, ...);
 /**
  * @brief Read from device
  *
- * Refer to rt_dev_read() for parameters and return values. Action
+ * Refer to rtdm_read() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -758,7 +758,7 @@ ssize_t rtdm_read(int fd, void *buf, size_t nbyte);
 /**
  * @brief Write to device
  *
- * Refer to rt_dev_write() for parameters and return values. Action
+ * Refer to rtdm_write() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -769,7 +769,7 @@ ssize_t rtdm_write(int fd, const void *buf, size_t nbyte);
 /**
  * @brief Receive message from socket
  *
- * Refer to rt_dev_recvmsg() for parameters and return values. Action
+ * Refer to rtdm_recvmsg() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -780,7 +780,7 @@ ssize_t rtdm_recvmsg(int fd, struct msghdr *msg, int flags);
 /**
  * @brief Receive message from socket
  *
- * Refer to rt_dev_recvfrom() for parameters and return values. Action
+ * Refer to rtdm_recvfrom() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -792,7 +792,7 @@ ssize_t rtdm_recvfrom(int fd, void *buf, size_t len, int 
flags,
 /**
  * @brief Receive message from socket
  *
- * Refer to rt_dev_recv() for parameters and return values. Action
+ * Refer to rtdm_recv() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -803,7 +803,7 @@ ssize_t rtdm_recv(int fd, void *buf, size_t len, int flags);
 /**
  * @brief Transmit message to socket
  *
- * Refer to rt_dev_sendmsg() for parameters and return values. Action
+ * Refer to rtdm_sendmsg() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -814,7 +814,7 @@ ssize_t rtdm_sendmsg(int fd, const struct msghdr *msg, int 
flags);
 /**
  * @brief Transmit message to socket
  *
- * Refer to rt_dev_sendto() for parameters and return values. Action
+ * Refer to rtdm_sendto() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -826,7 +826,7 @@ ssize_t rtdm_sendto(int fd, const void *buf, size_t len, 
int flags,
 /**
  * @brief Transmit message to socket
  *
- * Refer to rt_dev_send() for parameters and return values. Action
+ * Refer to rtdm_send() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -837,7 +837,7 @@ ssize_t rtdm_send(int fd, const void *buf, size_t len, int 
flags);
 /**
  * @brief Bind to local address
  *
- * Refer to rt_dev_bind() for parameters and return values. Action
+ * Refer to rtdm_bind() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -848,7 +848,7 @@ int rtdm_bind(int fd, const struct sockaddr *my_addr, 
socklen_t addrlen);
 /**
  * @brief Connect to remote address
  *
- * Refer to rt_dev_connect() for parameters and return values. Action
+ * Refer to rtdm_connect() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -859,7 +859,7 @@ int rtdm_connect(int fd, const struct sockaddr *serv_addr, 
socklen_t addrlen);
 /**
  * @brief Listen to incoming connection requests
  *
- * Refer to rt_dev_listen() for parameters and return values. Action
+ * Refer to rtdm_listen() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -870,7 +870,7 @@ int rtdm_listen(int fd, int backlog);
 /**
  * @brief Accept a connection request
  *
- * Refer to rt_dev_accept() for parameters and return values. Action
+ * Refer to rtdm_accept() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -881,7 +881,7 @@ int rtdm_accept(int fd, struct sockaddr *addr, socklen_t 
*addrlen);
 /**
  * @brief Shut down parts of a connection
  *
- * Refer to rt_dev_shutdown() for parameters and return values. Action
+ * Refer to rtdm_shutdown() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -892,7 +892,7 @@ int rtdm_shutdown(int fd, int how);
 /**
  * @brief Get socket option
  *
- * Refer to rt_dev_getsockopt() for parameters and return values. Action
+ * Refer to rtdm_getsockopt() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -904,7 +904,7 @@ int rtdm_getsockopt(int fd, int level, int optname, void 
*optval,
 /**
  * @brief Set socket option
  *
- * Refer to rt_dev_setsockopt() for parameters and return values. Action
+ * Refer to rtdm_setsockopt() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -916,7 +916,7 @@ int rtdm_setsockopt(int fd, int level, int optname, const 
void *optval,
 /**
  * @brief Get local socket address
  *
- * Refer to rt_dev_getsockname() for parameters and return values. Action
+ * Refer to rtdm_getsockname() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -927,7 +927,7 @@ int rtdm_getsockname(int fd, struct sockaddr *name, 
socklen_t *namelen);
 /**
  * @brief Get socket destination address
  *
- * Refer to rt_dev_getpeername() for parameters and return values. Action
+ * Refer to rtdm_getpeername() for parameters and return values. Action
  * depends on driver implementation, see @ref rtdm_profiles
  * "Device Profiles".
  *
@@ -962,7 +962,7 @@ int rtdm_getpeername(int fd, struct sockaddr *name, 
socklen_t *namelen);
  *
  * @coretags{secondary-only, might-switch}
  */
-int rt_dev_open(const char *path, int oflag, ...);
+int rtdm_open(const char *path, int oflag, ...);
 
 /**
  * @brief Create a socket
@@ -982,17 +982,17 @@ int rt_dev_open(const char *path, int oflag, ...);
  *
  * @coretags{secondary-only, might-switch}
  */
-int rt_dev_socket(int protocol_family, int socket_type, int protocol);
+int rtdm_socket(int protocol_family, int socket_type, int protocol);
 
 /**
  * @brief Close a device or socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_open() or 
rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_open() or rtdm_socket()
  *
  * @return 0 on success, otherwise a negative error code.
  *
- * @note If the matching rt_dev_open() or rt_dev_socket() call took place in
- * non-real-time context, rt_dev_close() must be issued within non-real-time
+ * @note If the matching rtdm_open() or rtdm_socket() call took place in
+ * non-real-time context, rtdm_close() must be issued within non-real-time
  * as well. Otherwise, the call will fail.
  *
  * Action depends on driver implementation, see @ref rtdm_profiles
@@ -1003,12 +1003,12 @@ int rt_dev_socket(int protocol_family, int socket_type, 
int protocol);
  *
  * @coretags{secondary-only, might-switch}
  */
-int rt_dev_close(int fd);
+int rtdm_close(int fd);
 
 /**
  * @brief Issue an IOCTL
  *
- * @param[in] fd File descriptor as returned by rt_dev_open() or 
rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_open() or rtdm_socket()
  * @param[in] request IOCTL code
  * @param ... Optional third argument, depending on IOCTL function
  * (@c void @c * or @c unsigned @c long)
@@ -1023,12 +1023,12 @@ int rt_dev_close(int fd);
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_ioctl(int fd, int request, ...);
+int rtdm_ioctl(int fd, int request, ...);
 
 /**
  * @brief Read from device
  *
- * @param[in] fd File descriptor as returned by rt_dev_open()
+ * @param[in] fd File descriptor as returned by rtdm_open()
  * @param[out] buf Input buffer
  * @param[in] nbyte Number of bytes to read
  *
@@ -1042,12 +1042,12 @@ int rt_dev_ioctl(int fd, int request, ...);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_read(int fd, void *buf, size_t nbyte);
+ssize_t rtdm_read(int fd, void *buf, size_t nbyte);
 
 /**
  * @brief Write to device
  *
- * @param[in] fd File descriptor as returned by rt_dev_open()
+ * @param[in] fd File descriptor as returned by rtdm_open()
  * @param[in] buf Output buffer
  * @param[in] nbyte Number of bytes to write
  *
@@ -1061,12 +1061,12 @@ ssize_t rt_dev_read(int fd, void *buf, size_t nbyte);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_write(int fd, const void *buf, size_t nbyte);
+ssize_t rtdm_write(int fd, const void *buf, size_t nbyte);
 
 /**
  * @brief Receive message from socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in,out] msg Message descriptor
  * @param[in] flags Message flags
  *
@@ -1080,12 +1080,12 @@ ssize_t rt_dev_write(int fd, const void *buf, size_t 
nbyte);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_recvmsg(int fd, struct msghdr *msg, int flags);
+ssize_t rtdm_recvmsg(int fd, struct msghdr *msg, int flags);
 
 /**
  * @brief Receive message from socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[out] buf Message buffer
  * @param[in] len Message buffer size
  * @param[in] flags Message flags
@@ -1102,13 +1102,13 @@ ssize_t rt_dev_recvmsg(int fd, struct msghdr *msg, int 
flags);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_recvfrom(int fd, void *buf, size_t len, int flags,
-                       struct sockaddr *from, socklen_t *fromlen);
+ssize_t rtdm_recvfrom(int fd, void *buf, size_t len, int flags,
+                     struct sockaddr *from, socklen_t *fromlen);
 
 /**
  * @brief Receive message from socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[out] buf Message buffer
  * @param[in] len Message buffer size
  * @param[in] flags Message flags
@@ -1123,12 +1123,12 @@ ssize_t rt_dev_recvfrom(int fd, void *buf, size_t len, 
int flags,
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_recv(int fd, void *buf, size_t len, int flags);
+ssize_t rtdm_recv(int fd, void *buf, size_t len, int flags);
 
 /**
  * @brief Transmit message to socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] msg Message descriptor
  * @param[in] flags Message flags
  *
@@ -1142,12 +1142,12 @@ ssize_t rt_dev_recv(int fd, void *buf, size_t len, int 
flags);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_sendmsg(int fd, const struct msghdr *msg, int flags);
+ssize_t rtdm_sendmsg(int fd, const struct msghdr *msg, int flags);
 
 /**
  * @brief Transmit message to socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] buf Message buffer
  * @param[in] len Message buffer size
  * @param[in] flags Message flags
@@ -1164,13 +1164,13 @@ ssize_t rt_dev_sendmsg(int fd, const struct msghdr 
*msg, int flags);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_sendto(int fd, const void *buf, size_t len, int flags,
-                     const struct sockaddr *to, socklen_t tolen);
+ssize_t rtdm_sendto(int fd, const void *buf, size_t len, int flags,
+                   const struct sockaddr *to, socklen_t tolen);
 
 /**
  * @brief Transmit message to socket
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] buf Message buffer
  * @param[in] len Message buffer size
  * @param[in] flags Message flags
@@ -1185,12 +1185,12 @@ ssize_t rt_dev_sendto(int fd, const void *buf, size_t 
len, int flags,
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-ssize_t rt_dev_send(int fd, const void *buf, size_t len, int flags);
+ssize_t rtdm_send(int fd, const void *buf, size_t len, int flags);
 
 /**
  * @brief Bind to local address
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] my_addr Address buffer
  * @param[in] addrlen Address buffer size
  *
@@ -1204,12 +1204,12 @@ ssize_t rt_dev_send(int fd, const void *buf, size_t 
len, int flags);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-int rt_dev_bind(int fd, const struct sockaddr *my_addr, socklen_t addrlen);
+int rtdm_bind(int fd, const struct sockaddr *my_addr, socklen_t addrlen);
 
 /**
  * @brief Connect to remote address
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] serv_addr Address buffer
  * @param[in] addrlen Address buffer size
  *
@@ -1223,13 +1223,13 @@ int rt_dev_bind(int fd, const struct sockaddr *my_addr, 
socklen_t addrlen);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-int rt_dev_connect(int fd, const struct sockaddr *serv_addr,
-                  socklen_t addrlen);
+int rtdm_connect(int fd, const struct sockaddr *serv_addr,
+                socklen_t addrlen);
 
 /**
  * @brief Listen for incomming connection requests
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] backlog Maximum queue length
  *
  * @return 0 on success, otherwise negative error code
@@ -1242,12 +1242,12 @@ int rt_dev_connect(int fd, const struct sockaddr 
*serv_addr,
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_listen(int fd, int backlog);
+int rtdm_listen(int fd, int backlog);
 
 /**
  * @brief Accept connection requests
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[out] addr Buffer for remote address
  * @param[in,out] addrlen Address buffer size
  *
@@ -1261,12 +1261,12 @@ int rt_dev_listen(int fd, int backlog);
  *
  * @coretags{mode-unrestricted, might-switch}
  */
-int rt_dev_accept(int fd, struct sockaddr *addr, socklen_t *addrlen);
+int rtdm_accept(int fd, struct sockaddr *addr, socklen_t *addrlen);
 
 /**
  * @brief Shut down parts of a connection
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] how Specifies the part to be shut down (@c SHUT_xxx)
 *
  * @return 0 on success, otherwise negative error code
@@ -1279,12 +1279,12 @@ int rt_dev_accept(int fd, struct sockaddr *addr, 
socklen_t *addrlen);
  *
  * @coretags{secondary-only, might-switch}
  */
-int rt_dev_shutdown(int fd, int how);
+int rtdm_shutdown(int fd, int how);
 
 /**
  * @brief Get socket option
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] level Addressed stack level
  * @param[in] optname Option name ID
  * @param[out] optval Value buffer
@@ -1300,13 +1300,13 @@ int rt_dev_shutdown(int fd, int how);
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_getsockopt(int fd, int level, int optname, void *optval,
+int rtdm_getsockopt(int fd, int level, int optname, void *optval,
                      socklen_t *optlen);
 
 /**
  * @brief Set socket option
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[in] level Addressed stack level
  * @param[in] optname Option name ID
  * @param[in] optval Value buffer
@@ -1322,13 +1322,13 @@ int rt_dev_getsockopt(int fd, int level, int optname, 
void *optval,
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_setsockopt(int fd, int level, int optname, const void *optval,
-                     socklen_t optlen);
+int rtdm_setsockopt(int fd, int level, int optname, const void *optval,
+                   socklen_t optlen);
 
 /**
  * @brief Get local socket address
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[out] name Address buffer
  * @param[in,out] namelen Address buffer size
  *
@@ -1342,12 +1342,12 @@ int rt_dev_setsockopt(int fd, int level, int optname, 
const void *optval,
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_getsockname(int fd, struct sockaddr *name, socklen_t *namelen);
+int rtdm_getsockname(int fd, struct sockaddr *name, socklen_t *namelen);
 
 /**
  * @brief Get socket destination address
  *
- * @param[in] fd File descriptor as returned by rt_dev_socket()
+ * @param[in] fd File descriptor as returned by rtdm_socket()
  * @param[out] name Address buffer
  * @param[in,out] namelen Address buffer size
  *
@@ -1361,7 +1361,7 @@ int rt_dev_getsockname(int fd, struct sockaddr *name, 
socklen_t *namelen);
  *
  * @coretags{task-unrestricted, might-switch}
  */
-int rt_dev_getpeername(int fd, struct sockaddr *name, socklen_t *namelen);
+int rtdm_getpeername(int fd, struct sockaddr *name, socklen_t *namelen);
 
 #endif /* DOXYGEN_CPP */
 


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

Reply via email to