mem.c (111462) | mem.c (111815) |
---|---|
1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 40 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 | 1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 40 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 |
41 * $FreeBSD: head/sys/i386/i386/mem.c 111462 2003-02-25 03:21:22Z mux $ | 41 * $FreeBSD: head/sys/i386/i386/mem.c 111815 2003-03-03 12:15:54Z phk $ |
42 */ 43 44/* 45 * Memory special file 46 */ 47 48#include <sys/param.h> 49#include <sys/conf.h> --- 23 unchanged lines hidden (view full) --- 73static d_open_t mmopen; 74static d_close_t mmclose; 75static d_read_t mmrw; 76static d_ioctl_t mmioctl; 77static d_mmap_t memmmap; 78 79#define CDEV_MAJOR 2 80static struct cdevsw mem_cdevsw = { | 42 */ 43 44/* 45 * Memory special file 46 */ 47 48#include <sys/param.h> 49#include <sys/conf.h> --- 23 unchanged lines hidden (view full) --- 73static d_open_t mmopen; 74static d_close_t mmclose; 75static d_read_t mmrw; 76static d_ioctl_t mmioctl; 77static d_mmap_t memmmap; 78 79#define CDEV_MAJOR 2 80static struct cdevsw mem_cdevsw = { |
81 /* open */ mmopen, 82 /* close */ mmclose, 83 /* read */ mmrw, 84 /* write */ mmrw, 85 /* ioctl */ mmioctl, 86 /* poll */ (d_poll_t *)seltrue, 87 /* mmap */ memmmap, 88 /* strategy */ nostrategy, 89 /* name */ "mem", 90 /* maj */ CDEV_MAJOR, 91 /* dump */ nodump, 92 /* psize */ nopsize, 93 /* flags */ D_MEM, | 81 .d_open = mmopen, 82 .d_close = mmclose, 83 .d_read = mmrw, 84 .d_write = mmrw, 85 .d_ioctl = mmioctl, 86 .d_mmap = memmmap, 87 .d_name = "mem", 88 .d_maj = CDEV_MAJOR, 89 .d_flags = D_MEM, |
94}; 95 96MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); 97 98struct mem_range_softc mem_range_softc; 99 100static int 101mmclose(dev_t dev, int flags, int fmt, struct thread *td) --- 267 unchanged lines hidden --- | 90}; 91 92MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); 93 94struct mem_range_softc mem_range_softc; 95 96static int 97mmclose(dev_t dev, int flags, int fmt, struct thread *td) --- 267 unchanged lines hidden --- |