summaryrefslogtreecommitdiff
path: root/viengoos/rm.h
diff options
context:
space:
mode:
authorneal <neal>2007-12-13 22:50:34 +0000
committerneal <neal>2007-12-13 22:50:34 +0000
commit0b50520433b6fe02dc6b29fb68c8a9fbe81aeb49 (patch)
tree64178588d7135f0c4b1e74aea80087777d31519c /viengoos/rm.h
parent13da1db335c0d377b309b1bd24ac02afdcfc8c7c (diff)
viengoos/
2007-12-13 Neal H. Walfield <neal@gnu.org> * rm.h (folio_object_alloc): Take additional parameter, a slot to store a weak capability. (CAP_COPY_WEAKEN): Define. * server.c (server_loop): Update implementation of folio_object_alloc to accept the additional parameter. If not ADDR_VOID, store a weak capability to the created object in the specified slot. If the CAP_COPY_WEAKEN flag is specified in a object_slot_copy_out, object_slot_copy_in or cap_copy invocation, copy a weakened capability to the target slot. hurd/ 2007-12-13 Neal H. Walfield <neal@gnu.org> * cap.h (cap_type_weak_p): New function. (cap_type_weaken): Likewise. (cap_copy_x): If CAP_COPY_WEAKEN is set in FLAGS, weaken the capability stored in TARGET. libhurd-mm/ 2007-12-13 Neal H. Walfield <neal@gnu.org> * storage.c (storage_alloc_): Update to folio_object_alloc's interface change. (storage_free_): Likewise. ruth/ 2007-12-13 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Update users of folio_object_alloc to interface change.
Diffstat (limited to 'viengoos/rm.h')
-rw-r--r--viengoos/rm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/viengoos/rm.h b/viengoos/rm.h
index 02c68e0..18235a4 100644
--- a/viengoos/rm.h
+++ b/viengoos/rm.h
@@ -111,9 +111,12 @@ RPC(folio_free, 2, 0, addr_t, principal, addr_t, folio)
/* Allocate INDEXth object in folio FOLIO as an object of type TYPE.
PRINCIPAL is charged. If OBJECT_SLOT is not ADDR_VOID, then stores
- a capability to the allocated object in OBJECT_SLOT. */
-RPC(folio_object_alloc, 5, 0, addr_t, principal,
- addr_t, folio, l4_word_t, index, l4_word_t, type, addr_t, object_slot)
+ a capability to the allocated object in OBJECT_SLOT. If
+ OBJECT_WEAK_SLOT is not ADDR_VOID, stores a weaken reference to the
+ created object. */
+RPC(folio_object_alloc, 6, 0, addr_t, principal,
+ addr_t, folio, l4_word_t, index, l4_word_t, type,
+ addr_t, object_slot, addr_t, object_weak_slot)
enum
{
@@ -124,6 +127,9 @@ enum
CAP_COPY_COPY_ADDR_TRANS_GUARD = 1 << 1,
/* Use guard in SOURCE. */
CAP_COPY_COPY_SOURCE_GUARD = 1 << 2,
+
+ /* When copying the capability copies a weakened reference. */
+ CAP_COPY_WEAKEN = 1 << 3,
};
/* Copy capability SOURCE to the capability slot TARGET.