patch-2.4.19 linux-2.4.19/include/net/sock.h
Next file: linux-2.4.19/include/net/tcp.h
Previous file: linux-2.4.19/include/net/route.h
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Fri Aug 2 17:39:46 2002
- Orig file:
linux-2.4.18/include/net/sock.h
- Orig date:
Fri Dec 21 09:42:04 2001
diff -urN linux-2.4.18/include/net/sock.h linux-2.4.19/include/net/sock.h
@@ -283,9 +283,9 @@
/* Data for direct copy to user */
struct {
struct sk_buff_head prequeue;
- int memory;
struct task_struct *task;
struct iovec *iov;
+ int memory;
int len;
} ucopy;
@@ -484,7 +484,7 @@
do { spin_lock_init(&((__sk)->lock.slock)); \
(__sk)->lock.users = 0; \
init_waitqueue_head(&((__sk)->lock.wq)); \
-} while(0);
+} while(0)
struct sock {
/* Socket demultiplex comparisons on incoming packets. */
@@ -1221,16 +1221,13 @@
#define SOCK_MIN_SNDBUF 2048
#define SOCK_MIN_RCVBUF 256
-/* Must be less or equal SOCK_MIN_SNDBUF */
-#define SOCK_MIN_WRITE_SPACE SOCK_MIN_SNDBUF
/*
* Default write policy as shown to user space via poll/select/SIGIO
- * Kernel internally doesn't use the MIN_WRITE_SPACE threshold.
*/
static inline int sock_writeable(struct sock *sk)
{
- return sock_wspace(sk) >= SOCK_MIN_WRITE_SPACE;
+ return atomic_read(&sk->wmem_alloc) < (sk->sndbuf / 2);
}
static inline int gfp_any(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)