aboutsummaryrefslogtreecommitdiff
path: root/mach-defpager
Commit message (Collapse)AuthorAgeFilesLines
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-033-232/+159
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* mach-defpager: Add defpager_server_nameSamuel Thibault2023-02-161-0/+2
| | | | To allow e.g. libubsan to detect it should be extra cautious.
* mach-defpager: Fix crash on pthread_cond_broadcastSamuel Thibault2023-02-161-3/+3
| | | | | We need to keep ds locked, otherwise it might disappear before we have a chance to broadcast the condition.
* Fix accessing bit 31Samuel Thibault2023-02-151-6/+6
| | | | | Shifting (signed) 1 to left 31 positions is undefined behavior. So make this an unsigned so it becomes defined behavior.
* Fix compiler warningSvante Signell2023-01-181-0/+1
|
* mach-defpager: Fix computing free spaceSamuel Thibault2023-01-011-5/+7
|
* mach-defpager: document lock orderingSamuel Thibault2022-12-311-0/+22
|
* mach-defpager: assert_backtrace() on panicSamuel Thibault2022-12-041-1/+2
| | | | | instead of just exiting: better print a backtrace so we get to know what happened.
* mach-defpager: Mark as essentialSamuel Thibault2022-12-031-0/+13
| | | | | So we get to know why the system gets stuck if mach-defpager happens to die.
* Fix types of read write and readables methodsEtienne Brateau2022-08-291-2/+2
| | | | Message-Id: <20220829193617.13481-1-etienne.brateau@gmail.com>
* Fix const warningsSamuel Thibault2022-01-173-7/+7
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* Make RPC input array parameters constSamuel Thibault2022-01-162-3/+3
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* Fix build warningsSamuel Thibault2022-01-011-0/+3
| | | | No actual behavior change.
* wire_task_self: Use in various translatorsSamuel Thibault2021-12-303-81/+4
| | | | | | wire_task_self() was duplicating mach-defpager's wire_all_memory(), we can just make mach-defpager now use the former (and not mlockall either). Also pci-arbiter and rumpdisk can use it.
* mach-defpager: Fix error reportingSamuel Thibault2021-08-221-1/+1
| | | | * mach-defpager/main.c (main): After mlockall, report error from errno, not the value returned by mlockall.
* mach-defpager: Drop kalloc/kfreeSamuel Thibault2021-08-166-409/+65
| | | | | | | | | | | | glibc is removing its malloc hooks, but gnumach now has support for mlockall, which we can just use instead of kalloc/kfree. * mach-defpager/main.c (main): Call mlockall. * mach-defpager/kalloc.c: Remove. * mach-defpager/kalloc.h: Remove. * mach-defpager/default_pager.c: Use malloc/free instead of kalloc/kfree. * mach-defpager/setup.c: Likewise.
* mach-defpager: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | * mach-defpager/default_pager.h (panic): Add noreturn function attribute.
* Remove remnants of cthreadsSamuel Thibault2020-11-111-5/+0
| | | | | | | | | | * doc/hurd.texi: Index pthread.h instead of cthreads.h * libports/Makefile (SRCS): Drop stubs.c. * libports/stubs.c: Remove file. * mach-defpager/default_pager.c (default_pager): Drop disabled cthreads calls. * pfinet/kmem_cache.c: Fix comment. * proc/stubs.c: Fix comments.
* Fix build with -fno-commonSamuel Thibault2020-03-312-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with #
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-053-30/+30
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* mach-defpager: fix pager leakRichard Braun2016-12-261-12/+20
| | | | | | | | | | | | The server code for no-senders notifications wasn't updated to expect protected payloads. * mach-defpager/default_pager.c (default_pager_no_senders): Accept the pager structure directly instead of its port name and update body accordingly. (default_pager_no_senders): Accept protected payloads in addition to send-once rights and fetch the pager structure according to the message type.
* mach-defpager: make the default pager use vm_wire_allRichard Braun2016-12-244-59/+13
| | | | | | | | | | | | | | | The vm_wire_all call was recently added to GNU Mach so that the default pager doesn't depend on glibc malloc hooks any more. * mach-defpager/default_pager.c (start_default_pager_thread): Remove call to wire_memory. * mach-defpager/kalloc.c (kget_space): Likewise. * mach-defpager/wiring.c: Include mach/gnumach.h. (wire_memory): Remove function. (wire_all_memory): Replace call to wire_memory with a direct call to vm_wire, call vm_wire_all after the fixup loop. (vm_allocate, __vm_allocate): Remove functions. * mach-defpager/wiring.h (wire_memory): Remove function.
* Remove support for the deprecated external memory interface.Justus Winter2016-12-101-29/+10
| | | | | | * libpager/stubs.c (_pager_S_memory_object_data_write): Drop stub. * mach-defpager/default_pager.c (seqnos_memory_object_data_write): Drop function.
* mach-defpager: Fix daemonization.Justus Winter2016-11-061-1/+3
| | | | * mach-defpager/main.c (main): Do not hang if the child dies.
* mach-defpager: Add missing unlockBrent W. Baccala2016-08-201-0/+1
| | | | | * mach-defpager/default_pager.c (destroy_paging_partition): Add missing unlock when destroying partition fails.
* mach-defpager: Fix debugging prints formatsBrent W. Baccala2016-08-201-16/+16
| | | | | | | * mach-defpager/default_pager.c (pager_dealloc_page, pager_read_offset, pager_write_offset, default_read, default_write, destroy_paging_partition, seqnos_memory_object_terminate, seqnos_memory_object_data_request, seqnos_memory_object_data_initialize): Fix debugging prints formats.
* Complete allocation hooksSamuel Thibault2016-05-301-0/+18
| | | | | | * mach-defpager/kalloc.c (realloc_hook, memalign_hook): New functions. (init_hook): Set __realloc_hook to realloc_hook and __memalign_hook to memalign_hook.
* Revert "drop the deprecated malloc/free hooks in hurd/mach-defpager"Samuel Thibault2016-05-301-4/+25
| | | | | | This reverts commit 8c49801c8f7e3f800cabedf8fca8ccec3cf35a22. The malloc hook is needed for calloc.
* mach-defpager: fix panic invocationJustus Winter2016-05-191-1/+1
| | | | | * mach-defpager/default_pager.c (default_pager_thread): Fix panic invocation.
* mach-defpager: fix error handlingJustus Winter2016-04-191-3/+3
| | | | | * mach-defpager/default_pager.c (S_default_pager_storage_info): Fix error handling.
* Add getting swap information from swapon and procfsSamuel Thibault2016-03-162-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | * hurd/default_pager.defs (default_pager_storage_info): New RPC. * hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC. * hurd/default_pager_types.h: Include <mach/machine/vm_types.h>. (vm_size_array_t): New type. * mach-defpager/priv.h (part): Add `name' field. * mach-defpager/default_pager.c (new_partition): Allocate and fill `part->name' field. Free it on error. (destroy_paging_partition): Free `part->name' field. (S_default_pager_storage_info): New function. * procfs/Makefile (SRCS): Add default_pagerUser.c. * procfs/rootdir.c: Include "default_pager_U.h". (rootdir_gc_swaps): New function. (rootdir_entries): Add "swaps" entry. * sutils/swapon.c: Include <argz.h> (show): New variable. (options): Add --show/-S option. (def_pager, dev_master): New variables (swaponoff): Move getting `def_pager' to... (get_def_pager): ... new function. (main): Support 'S' option. * trans/proxy-defpager.c (S_default_pager_storage_info): New function.
* mach-defpager: link dynamicallyJustus Winter2016-02-071-1/+0
| | | | * mach-defpager/Makefile (LDFLAGS): Drop.
* fix mach-defpager static linkingFlavio Cruz2016-01-011-1/+1
| | | | * mach-defpager/Makefile: Allow multiple definitions for mach-defpager.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
* drop the deprecated malloc/free hooks in hurd/mach-defpagerFlavio Cruz2015-12-291-25/+4
|
* misc: Fix typos in comments (found by codespell)Stefan Weil2015-01-031-1/+1
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix inclusion loop between hurd_types.defs and hurd/signal.h>Samuel Thibault2014-12-111-1/+1
| | | | | | * boot/Makefile (MIGSFLAGS): Add -DHURD_DEFAULT_PAYLOAD_TO_PORT=1. * mach-defpager/Makefile (MIGSFLAGS): Likewise. * hurd/hurd_types.defs: Do not include <hurd/ports.h>.
* Replace `bcopy' with `memcpy' or `memmove' as appropriateJustus Winter2014-12-101-2/+2
| | | | | | | | | | | | | | | | | | | * ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise.
* Replace `bzero' with `memset'Justus Winter2014-12-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
* Fix mach-defpager's kalloc valuesSamuel Thibault2014-11-101-7/+7
| | | | | | | | * mach-defpager/kalloc.c (MINSIZE): Set to sizeof(vm_offset_t) instead of hardcoded 4. (kalloc_init): Set kalloc_max to MINSIZE << (KLIST_MAX-1) instead of hardcoded 16384. (kalloc, kfree): Use the cache for the maximum size too.
* mach-defpager: use protected payloads for object lookupsJustus Winter2014-11-033-0/+18
| | | | | | | | | * mach-defpager/default_pager.c (pager_port_list_insert): Set protected payload. (pager_port_list_delete): Clear protected payload. * mach-defpager/mig-decls.h (begin_using_default_pager_payload): New function. * mach-defpager/mig-mutate.h: Add mutator.
* hurd: make memory_object parameter polymorphicJustus Winter2014-09-041-0/+2
| | | | | | | | | | | Make the memory_object parameter of default_pager_object_create polymorphic. This fixes https://savannah.gnu.org/bugs/?26751 . * hurd/default_pager.defs (default_pager_object_create): Make memory_object parameter polymorphic. * mach-defpager/default_pager.c (S_default_pager_object_create): Adjust accordingly. * trans/proxy-defpager.c (S_default_pager_object_create): Likewise.
* Avoid compiler warning about empty bodiesJustus Winter2014-05-261-2/+2
| | | | | | | | | | | | | Make empty bodies of control flow statements more explicit. Doing so will allow us to use stricter compiler settings. This would have cought 4ece292c. * console-client/xkb/xkb.c: Make empty bodies more explicit * libpipe/pipe.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/linux-src/net/ipv4/fib_hash.c: Likewise. * pflocal/connq.c: Likewise. * pflocal/socket.c: Likewise.
* mach-defpager: replace the magic typecast with a hash tableJustus Winter2014-03-254-67/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the mach-defpager used a "magic typecast" for object lookups. It renamed the port to the address of the associated object, and upon receiving a message it would cast the port name back to a pointer. While this might seem like an optimization, it actually makes the port handling in the kernel less efficient. Ports with small continuous names are stored in an array, while other ports get spilled in a splay tree. Replace the linked list of default_port_t objects with a hash table. Do not rename the ports, rather use the hash table to lookup objects associated with ports. * mach-defpager/default_pager.c (struct pager_port): Replace queue with hash table, remove count, move type declaration to priv.h. (pager_port_list_init): Adjust accordingly. (pager_port_list_insert): Likewise. (pager_port_list_delete): Likewise. (destroy_paging_partition): Replace queue_iterate with HURD_IHASH_ITERATE. (S_default_pager_objects): Likewise. (S_default_pager_object_pages): Likewise. (seqnos_memory_object_create): Do not rename the port but store it in the hash table. (S_default_pager_object_create): Likewise. * mach-defpager/priv.h (struct dstruct): Add fast-removal pointer. (pnameof): Remove obsolete macro definition. (dnameof): Likewise. * mach-defpager/mig-decls.h (begin_using_default_pager): Replace the magic typecast with a hash table lookup. * mach-defpager/Makefile (HURDLIBS): Add ihash.
* mach-defpager: fix local includesJustus Winter2014-03-253-7/+7
| | | | | | * mach-defpager/default_pager.c: Fix local includes. * mach-defpager/main.c: Likewise. * mach-defpager/setup.c: Likewise.
* mach-defpager: fix receiver lookupsJustus Winter2014-03-255-196/+272
| | | | | | | | | | | | | Previously, the receiver lookup was done manually in all the server functions. Use mig translator functions instead. * mach-defpager/mig-decls.h: New file. * mach-defpager/mig-mutate.h: Likewise. * mach-defpager/Makefile (MIGSFLAGS): Include mig-mutate.h. * mach-defpager/mach-defpager.c: Fix receiver lookups, move type definitions... * mach-defpager/priv.h: ... here, so that they can be used in mig-decls.h.
* mach-defpager: silently ignore requests to page to active partitionJustus Winter2014-03-121-2/+0
| | | | | | | | | | | | | | Currently, if mach-defpager is asked to page to an already active partition, it ignores this request and returns success. It does, however, print a message about this to stdout. This message might indicate to the user that there is some kind of a problem with the configuration of the machine, even though the code in new_partition clearly does not consider it an error to do such an request. * mach-defpager/default_pager.c (new_partition): Do not print a message if requested to page to an already active partition.
* mach-defpager: fix type of size argumentsJustus Winter2014-03-123-7/+8
| | | | | | | | * mach-defpager/default_pager.c (new_partition): Fix type of bsize. * mach-defpager/file_io.h (page_read_file_direct): Fix type of size argument. (page_write_file_direct): Likewise. * mach-defpager/setup.c (page_read_file_direct): Likewise. (page_write_file_direct): Likewise.
* mach-defpager: fix warnings about uninitialized variablesJustus Winter2014-03-122-7/+7
| | | | | | | * mach-defpager/default_pager.c (S_default_pager_objects): Initialize address, size-pairs to 0. (S_default_pager_object_pages): Likewise. * mach-defpager/kalloc.c (kget_space): Likewise.
* mach-defpager: fix warning about uninitialized variableJustus Winter2014-03-121-2/+2
| | | | | | | | | | | Previously, failure to look up the given partition was detected after the loop by checking whether the loop ran over all existing partitions. Initialize part to NULL and check for that instead. This retains the behavior, but expresses it in a way the compiler understands better. * mach-defpager/default_pager.c (destroy_paging_partition): Initialize part to NULL and check for it still being NULL after the loop.