direct-io.hg

view xen/drivers/net/Space.c @ 875:ad4db8b417c1

bitkeeper revision 1.547 (3fa3dd2aH8eamu3ONvYovJgq8wBNbQ)

Many files:
Fixes to the DOM0 interface and domain building code. Ready for new save/restore dom0_ops.
author kaf24@scramble.cl.cam.ac.uk
date Sat Nov 01 16:19:54 2003 +0000 (2003-11-01)
parents 170eb7974e43
children 890460f07ddf
line source
1 /*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Holds initial configuration information for devices.
7 *
8 * Version: @(#)Space.c 1.0.7 08/12/93
9 *
10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu>
11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12 * Donald J. Becker, <becker@scyld.com>
13 */
14 #include <linux/config.h>
15 #include <linux/netdevice.h>
17 /*
18 * KAF (23/7/02): All the probe shit is gone from here -- each network
19 * driver should probe as part of its setup, and dynamically append
20 * to dev_base when it finds a NIC.
21 */
23 /*
24 * The @dev_base list is protected by @dev_base_lock and the rtln
25 * semaphore.
26 *
27 * Pure readers hold dev_base_lock for reading.
28 *
29 * Writers must hold the rtnl semaphore while they loop through the
30 * dev_base list, and hold dev_base_lock for writing when they do the
31 * actual updates. This allows pure readers to access the list even
32 * while a writer is preparing to update it.
33 *
34 * To put it another way, dev_base_lock is held for writing only to
35 * protect against pure readers; the rtnl semaphore provides the
36 * protection against other writers.
37 *
38 * See, for example usages, register_netdevice() and
39 * unregister_netdevice(), which must be called with the rtnl
40 * semaphore held.
41 */
42 struct net_device *dev_base = NULL;
43 rwlock_t dev_base_lock = RW_LOCK_UNLOCKED;