From 130ffe56c693fd20c162135ae4fe9dc6421207ad Mon Sep 17 00:00:00 2001 From: neal Date: Sat, 22 Dec 2007 17:27:45 +0000 Subject: hurd/ 2007-12-22 Neal H. Walfield * folio.h (FOLIO_PRIORITY_BITS): Define. (FOLIO_PRIORITY_MIN): Likewise. (FOLIO_PRIORITY_LRU): Likewise. (FOLIO_PRIORITY_MAX): Likewise. (FOLIO_GROUP_BITS): Likewise. (FOLIO_GROUP_NONE): Likewise. (FOLIO_GROUP_MIN): Likewise. (FOLIO_GROUP_MAX): Likewise. (struct folio_policy): New structure. (FOLIO_POLICY_INIT): Define. (FOLIO_POLICY_VOID): Likewise. (FOLIO_POLICY_DEFAULT): Likewise. (struct folio): Add field policy. (RM_folio_policy): Define. (folio_alloc): Take additional parameter policy. (FOLIO_POLICY_DELIVER): Define. (FOLIO_POLICY_DISCARDABLE_SET): Likewise. (FOLIO_POLICY_GROUP_SET): Likewise. (FOLIO_POLICY_PRIORITY_SET): Likewise. (FOLIO_POLICY_SET): Likewise. (folio_policy): New method. viengoos/ 2007-12-22 Neal H. Walfield * object.h (folio_alloc): Take additional parameter policy. Update users. (folio_policy): New declaration. * object.c: Include . (folio_alloc): Take additional parameter policy. Use it. (folio_policy): New function. * server.c (server_loop): Update folio_alloc implementation to handle additional parameter policy. Implement the folio_policy method. libhurd-mm/ 2007-12-22 Neal H. Walfield * storage.c (storage_alloc_): Update rm_folio_alloc use to reflect API changes. ruth/ 2007-12-22 Neal H. Walfield * ruth.c (main): Update rm_folio_alloc use to reflect API changes. --- viengoos/object.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'viengoos/object.h') diff --git a/viengoos/object.h b/viengoos/object.h index fb8c93c..ed3a7ea 100644 --- a/viengoos/object.h +++ b/viengoos/object.h @@ -388,9 +388,11 @@ object_claim_ (struct activity *activity, struct object *object) object_claim_ (a, o); \ }) -/* Allocate a folio to activity ACTIVITY. Returns NULL if not - possible. Otherwise a pointer to the in-memory folio. */ -extern struct folio *folio_alloc (struct activity *activity); +/* Allocate a folio to activity ACTIVITY. POLICY is the new folio's + initial storage policy. Returns NULL if not possible. Otherwise a + pointer to the in-memory folio. */ +extern struct folio *folio_alloc (struct activity *activity, + struct folio_policy policy); /* Assign the storage designated by FOLIO to the activity ACTIVITY. */ extern void folio_parent (struct activity *activity, struct folio *folio); @@ -431,4 +433,11 @@ object_free (struct activity *activity, struct object *object) folio_object_free (activity, folio, page); } +/* Get and set folio FOLIO's storage policy according to flags FLAGS, + IN and OUT. */ +extern void folio_policy (struct activity *activity, + struct folio *folio, + uintptr_t flags, struct folio_policy in, + struct folio_policy *out); + #endif -- cgit v1.2.3