device_pager.c (1c7c3c6a869e5eb64a19fda327dbe9f37af584b2) device_pager.c (e4542174b02a9ad9a5c3e802f97df69a3ee781c1)
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. 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.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)device_pager.c 8.1 (Berkeley) 6/11/93
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. 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.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)device_pager.c 8.1 (Berkeley) 6/11/93
39 * $Id: device_pager.c,v 1.37 1999/01/08 17:31:23 eivind Exp $
39 * $Id: device_pager.c,v 1.38 1999/01/21 08:29:09 dillon Exp $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/conf.h>
45#include <sys/mman.h>
46#include <sys/malloc.h>
47

--- 4 unchanged lines hidden (view full) ---

52#include <vm/vm_pager.h>
53#include <vm/vm_zone.h>
54
55static void dev_pager_init __P((void));
56static vm_object_t dev_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t,
57 vm_ooffset_t));
58static void dev_pager_dealloc __P((vm_object_t));
59static int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/conf.h>
45#include <sys/mman.h>
46#include <sys/malloc.h>
47

--- 4 unchanged lines hidden (view full) ---

52#include <vm/vm_pager.h>
53#include <vm/vm_zone.h>
54
55static void dev_pager_init __P((void));
56static vm_object_t dev_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t,
57 vm_ooffset_t));
58static void dev_pager_dealloc __P((vm_object_t));
59static int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
60static int dev_pager_putpages __P((vm_object_t, vm_page_t *, int,
60static void dev_pager_putpages __P((vm_object_t, vm_page_t *, int,
61 boolean_t, int *));
62static boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
63 int *));
64
65/* list of device pager objects */
66static struct pagerlst dev_pager_object_list;
67
68static vm_zone_t fakepg_zone;

--- 151 unchanged lines hidden (view full) ---

220 }
221 s = splhigh();
222 vm_page_insert(page, object, offset);
223 splx(s);
224
225 return (VM_PAGER_OK);
226}
227
61 boolean_t, int *));
62static boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
63 int *));
64
65/* list of device pager objects */
66static struct pagerlst dev_pager_object_list;
67
68static vm_zone_t fakepg_zone;

--- 151 unchanged lines hidden (view full) ---

220 }
221 s = splhigh();
222 vm_page_insert(page, object, offset);
223 splx(s);
224
225 return (VM_PAGER_OK);
226}
227
228static int
228static void
229dev_pager_putpages(object, m, count, sync, rtvals)
230 vm_object_t object;
231 vm_page_t *m;
232 int count;
233 boolean_t sync;
234 int *rtvals;
235{
236 panic("dev_pager_putpage called");

--- 46 unchanged lines hidden ---
229dev_pager_putpages(object, m, count, sync, rtvals)
230 vm_object_t object;
231 vm_page_t *m;
232 int count;
233 boolean_t sync;
234 int *rtvals;
235{
236 panic("dev_pager_putpage called");

--- 46 unchanged lines hidden ---