summaryrefslogtreecommitdiff
path: root/console/pager.h
blob: 974db9615079a0d268fef30c1fe230fd3c3f26ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* pager.h - Interface to the pager for display component of a virtual console.
   Copyright (C) 2002 Free Software Foundation, Inc.
   Written by Marcus Brinkmann.

   This file is part of the GNU Hurd.

   The GNU Hurd is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2, or (at
   your option) any later version.

   The GNU Hurd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */

#ifndef PAGER_H
#define PAGER_H

struct user_pager
{
  struct pager *pager;  
  memory_object_t memobj;
};

/* Initialize the pager for the display component.  */
void user_pager_init (void);

/* Create a new pager in USER_PAGER with NPAGES pages, and return a
   mapping to the memory in *USER.  */
error_t user_pager_create (struct user_pager *user_pager, unsigned int npages,
			   struct cons_display **user);

/* Destroy the pager USER_PAGER and the mapping at USER.  */
void user_pager_destroy (struct user_pager *user_pager,
			 struct cons_display *user);

/* Allocate a reference for the memory object backing the pager
   USER_PAGER with protection PROT and return it.  */
mach_port_t user_pager_get_filemap (struct user_pager *user_pager,
				    vm_prot_t prot);

#endif	/* PAGER_H_ */