aboutsummaryrefslogtreecommitdiff
path: root/libpager/pager-memcpy.c
Commit message (Collapse)AuthorAgeFilesLines
* Style tweaksSergey Bugaev2023-05-101-4/+4
| | | | Message-Id: <20230508213136.608575-42-bugaevc@gmail.com>
* libpager: fix assertion unsigned against 0Etienne Brateau2022-01-201-3/+3
| | | | | | | Comparing an unsigned to be superior or equals to 0 is always true, instead move the assert before the substraction and compare it to the value to substract. Message-Id: <20220119192945.36654-2-etienne.brateau@gmail.com>
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-13/+13
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* Fix buildSamuel Thibault2016-11-201-1/+1
| | | | | | * libpager/pager-memcpy.c (pager_memcpy): Pass 1 as second parameter to sigsetjmp. * libstore/memobj.c (memobj_memcpy): Likewise.
* libpager, libstore: Fix crash on ENOSPC while writing dataSamuel Thibault2016-11-201-2/+3
| | | | | | | | | | | | | We need to save blocked signals, otherwise longjmp will not unblock SIGSEGV/SIGBUS, and thus next exception will kill us. Also, we need to make sure that the preemptor is set at the right window in main memory before letting a handler see it. * libpager/pager-memcpy.c (do_memcpy): Call __sync_synchronize() between aligning the fault preemptor and actually accessing data. (fault): Use siglongjmp instead of longjmp. (pager_memcpy): Use sigsetjmp instead of setjmp. * libstore/memobj.c (copy, fault, memobj_memcpy): Likewise.
* Avoid hitting VM_MAX_ADDRESSSamuel Thibault2014-11-101-1/+3
| | | | | | * libpager/pager-memcpy.c (pager_memcpy): Reset address passed to vm_map on each loop, to avoid potentially monotonically increasing up to VM_MAX_ADDRESS.
* Deal with odd kernel behaviorSamuel Thibault2014-11-091-1/+1
| | | | | | | | | | | | | | Some versions of gnumach actually take address as a mapping hint, and would fail if the hint is bogus. Make sure to pass 0 for those versions. * console/pager.c (user_pager_create): Make sure to set *user to 0 before calling vm_map. * libdiskfs/disk-pager.c (diskfs_start_disk_pager): Make sure to set *image to 0 before calling vm_map. * libpager/pager-memcpy.c (pager_memcpy): Set window to 0 before calling vm_map. * tmpfs/node.c (diskfs_get_filemap): Make sure to set np->dn->u.reg.memref to 0 before calling vm_map.
* Upgrade pager-memcpy parametersSamuel Thibault2011-12-291-5/+6
| | | | | * libpager/pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): Increase to 8 pages. (VMCOPY_WINDOW_DEFAULT_SIZE, MEMCPY_WINDOW_DEFAULT_SIZE): Increase to 32 pages.
* 2002-04-10 Neal H Walfield,,, <neal@cs.uml.edu>Neal H. Walfield2002-04-111-2/+1
| | | | | * pager-memcpy.c (pager_memcpy): Pass not the block but the byte offset of the page in question to pager_get_error.
* 2002-04-10 Neal H Walfield <neal@cs.uml.edu>Neal H. Walfield2002-04-101-43/+153
| | | | | * pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): New macro. (pager_memcpy): Rewritten to use vmcopy.
* 2001-02-25 Roland McGrath <roland@frob.com>Roland McGrath2001-02-261-1/+2
| | | | * pager-memcpy.c: Include <string.h> for memcpy decl.
* 2000-01-24 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath2000-01-241-1/+6
| | | | * pager-memcpy.c (pager_memcpy): Short-circuit return for zero size.
* 1999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-111-0/+1
| | | | | * priv.h: Add #include <sys/mman.h> for munmap decl. * pager-memcpy.c: Likewise.
* 1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-031-3/+3
| | | | | | | | | | * data-return.c (_pager_do_write_request): Use munmap instead of vm_deallocate. * object-terminate.c (_pager_free_structure): Likewise. * pagemap.c (_pager_pagemap_resize): Likewise. * pager-memcpy.c (pager_memcpy): Likewise. * pager.h (pager_write_page): Doc adjustment.
* (pager_memcpy):Miles Bader1997-02-051-5/+5
| | | | `preempter' -> `preemptor'.
* (pager_memcpy): fixupMichael I. Bushnell1996-04-111-1/+1
|
* Initial revisionMichael I. Bushnell1996-04-111-0/+101