summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorneal <neal>2008-06-24 14:35:20 +0000
committerneal <neal>2008-06-24 14:35:20 +0000
commitb66325df3e8b995b52f9a21e6750f20fd526db0a (patch)
treecc5c173bad5e91ce082c264508a8ace46a1a3ea8 /hurd
parent7cc0d3ed39b6cb61d897d348b7f5bd88c8294282 (diff)
hurd/
2008-06-24 Neal H. Walfield <neal@gnu.org> * cap.h (RM_object_discard): New define. (object_discard): New method. viengoos/ 2008-06-24 Neal H. Walfield <neal@gnu.org> * server.c (server_loop): Implement cap_discard. * rm.h (rm_method_id_string): Handle the RM_object_discard case. libhurd-mm/ 2008-06-24 Neal H. Walfield <neal@gnu.org> * madvise.c: New file. * Makefile.am (libhurd_mm_a_SOURCES): Add madvise.c. * pager.h (pager_advice_normal, pager_advice_random, pager_advice_sequential, pager_advice_willneed, pager_advice_dontneed): Define. (pager_advise_t): New typedef. (struct pager): Add field advise. * anonymous.c (advise): New function. (anonymous_pager_alloc): Set ANON->PAGER.ADVISE to it.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/ChangeLog5
-rw-r--r--hurd/cap.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 67493b4..c1cb12e 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-24 Neal H. Walfield <neal@gnu.org>
+
+ * cap.h (RM_object_discard): New define.
+ (object_discard): New method.
+
2008-06-23 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity_stats): New fields available_local,
diff --git a/hurd/cap.h b/hurd/cap.h
index dadffdb..5722268 100644
--- a/hurd/cap.h
+++ b/hurd/cap.h
@@ -377,6 +377,7 @@ enum
RM_object_slot_copy_in,
RM_object_slot_read,
RM_object_discarded_clear,
+ RM_object_discard,
RM_object_status,
};
@@ -472,6 +473,13 @@ RPC(object_slot_read, 4, 2, addr_t, principal, addr_t, address_space,
RPC(object_discarded_clear, 2, 0,
addr_t, principal, addr_t, object)
+/* If the object designated by OBJECT is in memory, discard it.
+ OBJECT must have write authority. This does not set the object's
+ discarded bit and thus does not result in a fault. Instead, the
+ next access will see zero-filled memory. */
+RPC(object_discard, 2, 0,
+ addr_t, principal, addr_t, object)
+
enum
{
object_dirty = 1 << 0,