diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-09-22 01:28:35 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-09-22 01:28:35 +0000 |
commit | 2e9c58228926f8d0e63fa4e0a7e97942b7da0a42 (patch) | |
tree | 7f31195901a8bc0f71f75830ca88abe1566a24a6 /console/pager.h | |
parent | 18e5ffbf236c2a9c6877ddcbf33d6f8f28a4e71c (diff) | |
download | hurd-2e9c58228926f8d0e63fa4e0a7e97942b7da0a42.tar.gz hurd-2e9c58228926f8d0e63fa4e0a7e97942b7da0a42.tar.bz2 hurd-2e9c58228926f8d0e63fa4e0a7e97942b7da0a42.zip |
2002-09-22 Marcus Brinkmann <marcus@gnu.org>
* pager.c, pager.h: New file.
* Makefile (SRCS): Add pager.c.
(LCLHDRS): Add pager.h.
* display.c: Do not include <hurd/pager.h>, <sys/mman.h>,
<sys/io.h>, <fcntl.h> and <sys/fcntl.h>. Include <hurd/ports.h>
and "pager.h".
(struct display): Replace member PAGER and MEMOBJ with USER_PAGER.
(display_get_filemap): Implement with user_pager_get_filemap.
(user_destroy): Implement with user_pager_destroy.
(user_create): Implement partially with user_create.
(display_init): Call user_pager_init.
(struct user_pager_info, pager_bucket, pager_clear_user_data,
pager_read_page, pager_write_page, pager_unlock_page,
pager_report_extent, pager_dropweak, service_paging_requests):
Move to ...
* pager.c: ... here.
Diffstat (limited to 'console/pager.h')
-rw-r--r-- | console/pager.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/console/pager.h b/console/pager.h new file mode 100644 index 00000000..974db961 --- /dev/null +++ b/console/pager.h @@ -0,0 +1,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_ */ |