patch-2.2.4 linux/include/net/sock.h

Next file: linux/include/net/tcp.h
Previous file: linux/include/net/route.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/include/net/sock.h linux/include/net/sock.h
@@ -918,6 +918,18 @@
 extern void net_reset_timer (struct sock *, int, unsigned long);
 extern void net_timer (unsigned long);
 
+extern __inline__ int gfp_any(void)
+{
+	return in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
+}
+
+#ifdef __SMP__
+#define net_serialize_enter()	start_bh_atomic()
+#define net_serialize_leave()	end_bh_atomic()
+#else
+#define net_serialize_enter()	barrier();
+#define net_serialize_leave()	barrier();
+#endif
 
 /* 
  *	Enable debug/info messages 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)