| 1 |
/* stupid stub functions never called, needed because libdiskfs uses libpager |
| 2 |
Copyright (C) 2001 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of the GNU Hurd. |
| 5 |
|
| 6 |
The GNU Hurd is free software; you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation; either version 2, or (at your option) |
| 9 |
any later version. |
| 10 |
|
| 11 |
The GNU Hurd is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with the GNU Hurd; see the file COPYING. If not, write to |
| 18 |
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 |
|
| 20 |
|
| 21 |
#include <hurd/pager.h> |
| 22 |
#include <stdlib.h> |
| 23 |
|
| 24 |
/* The user must define this function. For pager PAGER, read one |
| 25 |
page from offset PAGE. Set *BUF to be the address of the page, |
| 26 |
and set *WRITE_LOCK if the page must be provided read-only. |
| 27 |
The only permissible error returns are EIO, EDQUOT, and ENOSPC. */ |
| 28 |
error_t |
| 29 |
pager_read_page (struct user_pager_info *pager, |
| 30 |
vm_offset_t page, |
| 31 |
vm_address_t *buf, |
| 32 |
int *write_lock) |
| 33 |
{ |
| 34 |
abort(); |
| 35 |
return EIEIO; |
| 36 |
} |
| 37 |
|
| 38 |
/* The user must define this function. For pager PAGER, synchronously |
| 39 |
write one page from BUF to offset PAGE. Do not deallocate BUF, and do |
| 40 |
not keep any references to BUF. The only permissible error returns |
| 41 |
are EIO, EDQUOT, and ENOSPC. */ |
| 42 |
error_t |
| 43 |
pager_write_page (struct user_pager_info *pager, |
| 44 |
vm_offset_t page, |
| 45 |
vm_address_t buf) |
| 46 |
{ |
| 47 |
abort(); |
| 48 |
return EIEIO; |
| 49 |
} |
| 50 |
|
| 51 |
/* The user must define this function. A page should be made writable. */ |
| 52 |
error_t |
| 53 |
pager_unlock_page (struct user_pager_info *pager, |
| 54 |
vm_offset_t address) |
| 55 |
{ |
| 56 |
abort(); |
| 57 |
return EIEIO; |
| 58 |
} |
| 59 |
|
| 60 |
void |
| 61 |
pager_notify_evict (struct user_pager_info *pager, |
| 62 |
vm_offset_t page) |
| 63 |
{ |
| 64 |
abort(); |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
/* The user must define this function. It should report back (in |
| 69 |
*OFFSET and *SIZE the minimum valid address the pager will accept |
| 70 |
and the size of the object. */ |
| 71 |
error_t |
| 72 |
pager_report_extent (struct user_pager_info *pager, |
| 73 |
vm_address_t *offset, |
| 74 |
vm_size_t *size) |
| 75 |
{ |
| 76 |
abort(); |
| 77 |
return EIEIO; |
| 78 |
} |
| 79 |
|
| 80 |
/* The user must define this function. This is called when a pager is |
| 81 |
being deallocated after all extant send rights have been destroyed. */ |
| 82 |
void |
| 83 |
pager_clear_user_data (struct user_pager_info *pager) |
| 84 |
{ |
| 85 |
abort(); |
| 86 |
} |
| 87 |
|
| 88 |
/* The use must define this function. This will be called when the ports |
| 89 |
library wants to drop weak references. The pager library creates no |
| 90 |
weak references itself. If the user doesn't either, then it's OK for |
| 91 |
this function to do nothing. */ |
| 92 |
void |
| 93 |
pager_dropweak (struct user_pager_info *p) |
| 94 |
{ |
| 95 |
abort(); |
| 96 |
} |