aboutsummaryrefslogtreecommitdiff
path: root/rumpdisk
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-30 00:09:32 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-30 00:10:07 +0100
commitbe8fbc0fa5a36d538cf34df8d6f0d30683075851 (patch)
tree5f053dfd393dfd0223e005f13ffe52b7f12d39fe /rumpdisk
parent2a297c298df1eeea6a2839fcbc121f1b1aa13d81 (diff)
downloadhurd-be8fbc0fa5a36d538cf34df8d6f0d30683075851.tar.gz
hurd-be8fbc0fa5a36d538cf34df8d6f0d30683075851.tar.bz2
hurd-be8fbc0fa5a36d538cf34df8d6f0d30683075851.zip
wire_task_self: Use in various translators
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.
Diffstat (limited to 'rumpdisk')
-rw-r--r--rumpdisk/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/rumpdisk/main.c b/rumpdisk/main.c
index a1873c31..6a011e37 100644
--- a/rumpdisk/main.c
+++ b/rumpdisk/main.c
@@ -25,7 +25,6 @@
#include <error.h>
#include <argp.h>
#include <version.h>
-#include <sys/mman.h>
#include "libmachdev/machdev.h"
#include "block-rump.h"
@@ -117,7 +116,7 @@ main (int argc, char **argv)
/* Make sure we will not swap out, in case we drive the disk used for
swapping. */
- err = mlockall(MCL_CURRENT | MCL_FUTURE);
+ err = wire_task_self ();
if (err)
error (1, errno, "cannot lock all memory");