diff options
author | Justus Winter <justus@gnupg.org> | 2016-05-22 19:35:10 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-08-07 23:28:45 +0200 |
commit | 0e3a795af98b6441d0a9928036e140978511e272 (patch) | |
tree | 801984832811a5f7bb24c847e07b5b47900e9737 /doc | |
parent | ceae83bd25aadee094ec9d3a95cf27510cea2037 (diff) |
libpager: provide 'pager_create_alloc'
Add a variant to 'pager_create' that allocates memory for the user
hook next to the pager data increasing locality.
* console/pager.c (pager_clear_user_data): Fix type of 'idx', do not
free 'upi'.
(user_pager_create): Use the new function.
* doc/hurd.texi: Document new function.
* ext2fs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* fatfs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* isofs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* libpager/pager-create.c (_pager_create): New generic allocation
function.
(pager_create): Use the new generic function.
(pager_create_alloc): New function.
* libpager/pager.h (pager_create_alloc): New prototype.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/hurd.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/hurd.texi b/doc/hurd.texi index 2bcf561b..8428a77b 100644 --- a/doc/hurd.texi +++ b/doc/hurd.texi @@ -1410,6 +1410,11 @@ create references to pagers by use of the relevant ports library functions. On errors, return null and set @code{errno}. @end deftypefun +@deftypefun {struct pager *} pager_create_alloc (@w{size_t @var{u_pager_size}}, @w{struct port_bucket *@var{bucket}}, @w{boolean_t @var{may_cache}}, @w{memory_object_copy_strategy_t @var{copy_strategy}}) +Likewise, but allocate space for the user hook adjacent to the pager +data. +@end deftypefun + Once you are ready to turn over control to the pager library, you should call @code{ports_manage_port_operations_multithread} on the @var{bucket}, using @code{pager_demuxer} as the ports @var{demuxer}. |