diff options
Diffstat (limited to 'cpukit/libnetworking/sys')
-rw-r--r-- | cpukit/libnetworking/sys/socket.h | 19 | ||||
-rw-r--r-- | cpukit/libnetworking/sys/socketvar.h | 2 |
2 files changed, 19 insertions, 2 deletions
diff --git a/cpukit/libnetworking/sys/socket.h b/cpukit/libnetworking/sys/socket.h index 7e0f6c7572..6442581db6 100644 --- a/cpukit/libnetworking/sys/socket.h +++ b/cpukit/libnetworking/sys/socket.h @@ -37,6 +37,8 @@ #ifndef _SYS_SOCKET_H_ #define _SYS_SOCKET_H_ +#include <sys/cdefs.h> + /* * Definitions related to sockets: types, address families, options. */ @@ -79,6 +81,12 @@ #define SO_PRIVSTATE 0x1009 /* get/deny privileged state */ /* + * 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. */ struct linger { @@ -87,6 +95,15 @@ struct linger { }; /* + * RTEMS addition: structure used to get and set wakeup function. + */ +struct socket; +struct sockwakeup { + void (*sw_pfn) __P((struct socket *, caddr_t)); + caddr_t sw_arg; +}; + +/* * Level number for (get/set)sockopt() to apply to socket itself. */ #define SOL_SOCKET 0xffff /* options for socket level */ @@ -327,8 +344,6 @@ struct omsghdr { #ifndef KERNEL -#include <sys/cdefs.h> - __BEGIN_DECLS int accept __P((int, struct sockaddr *, int *)); int bind __P((int, const struct sockaddr *, int)); diff --git a/cpukit/libnetworking/sys/socketvar.h b/cpukit/libnetworking/sys/socketvar.h index 0eae3d4aa5..5690defb43 100644 --- a/cpukit/libnetworking/sys/socketvar.h +++ b/cpukit/libnetworking/sys/socketvar.h @@ -89,6 +89,8 @@ struct socket { struct selinfo sb_sel; /* process selecting read/write */ short sb_flags; /* flags, see below */ u_long sb_timeo; /* timeout for read/write */ + void (*sb_wakeup) __P((struct socket *, caddr_t)); + caddr_t sb_wakeuparg; /* arg for above */ } so_rcv, so_snd; #define SB_MAX (256*1024) /* default for max chars in sockbuf */ #define SB_LOCK 0x01 /* lock on data queue */ |