From e79a0ca75fbc87c17e220f6a80a64bff3d10c9dd Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 28 Jun 2016 07:50:59 +0200 Subject: libnetworking: Move RTEMS-specific socket wake-up Close #2748. --- cpukit/libnetworking/kern/uipc_socket.c | 2 ++ cpukit/libnetworking/rtems/rtems_bsdnet.h | 16 ++++++++++++++++ cpukit/libnetworking/sys/socket.h | 15 --------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/cpukit/libnetworking/kern/uipc_socket.c b/cpukit/libnetworking/kern/uipc_socket.c index a5836531c6..1ea34a38af 100644 --- a/cpukit/libnetworking/kern/uipc_socket.c +++ b/cpukit/libnetworking/kern/uipc_socket.c @@ -51,6 +51,8 @@ * Turn this feature into essentially dead code. */ #define SO_PRIVSTATE 0x1009 /* get/deny privileged state */ + +#include #endif /* __rtems__ */ static int somaxconn = SOMAXCONN; diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h index 5a95b3a2d2..80886ec736 100644 --- a/cpukit/libnetworking/rtems/rtems_bsdnet.h +++ b/cpukit/libnetworking/rtems/rtems_bsdnet.h @@ -316,6 +316,22 @@ void* rtems_bsdnet_malloc_mbuf(size_t size, int type); #define MBUF_MALLOC_MCLREFCNT (1) #define MBUF_MALLOC_MBUF (2) +/* + * RTEMS-specific socket wake-up additions previously part of . + * + * An alternative in the LibBSD network stack for this is KQUEUE(2). + */ + +#define SO_SNDWAKEUP 0x1020 /* wakeup when ready to send */ +#define SO_RCVWAKEUP 0x1021 /* wakeup when ready to receive */ + +struct socket; + +struct sockwakeup { + void (*sw_pfn)(struct socket *, void *); + void *sw_arg; +}; + #ifdef __cplusplus } #endif diff --git a/cpukit/libnetworking/sys/socket.h b/cpukit/libnetworking/sys/socket.h index 85de630565..0e9df62ec4 100644 --- a/cpukit/libnetworking/sys/socket.h +++ b/cpukit/libnetworking/sys/socket.h @@ -101,12 +101,6 @@ typedef __socklen_t socklen_t; #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ -/* - * RTEMS addition: get and set wakeup functions. - */ -#define SO_SNDWAKEUP 0x1020 /* wakeup when ready to send */ -#define SO_RCVWAKEUP 0x1021 /* wakeup when ready to receive */ - /* * Structure used for manipulating linger option. */ @@ -115,15 +109,6 @@ struct linger { int l_linger; /* linger time */ }; -/* - * RTEMS addition: structure used to get and set wakeup function. - */ -struct socket; -struct sockwakeup { - void (*sw_pfn)(struct socket *, void *); - void *sw_arg; -}; - /* * Level number for (get/set)sockopt() to apply to socket itself. */ -- cgit v1.2.3