diff options
author | neal <neal> | 2008-02-08 11:54:07 +0000 |
---|---|---|
committer | neal <neal> | 2008-02-08 11:54:07 +0000 |
commit | 168a69b987e15468ca8c6b160a55462d31b32c0e (patch) | |
tree | 1d212949a9e26a7b12da0f2119cd7d45b68f0cb4 /viengoos/object.h | |
parent | 83f8ffef350ed30288b9955e79549e29c7a7a5c3 (diff) |
2008-02-08 Neal H. Walfield <neal@gnu.org>
* object.h (memory_object_destroy): Update comment to indicate
that LRU_LOCK must not be held by the caller.
(object_desc_claim): Update comment to indicate that LRU_LOCK must
be held by the caller.
* object.c (memory_object_destroy): Don't assert that LRU_LOCK is
held. Take the lock before calling object_desc_claim.
(object_desc_claim): Assert that LRU_LOCK is held.
* viengoos.c (system_task_load): Take LRU_LOCK before calling
object_claim.
* memory.c (memory_frame_allocate): After getting an object, lock
it and then drop LRU_LOCK.
Diffstat (limited to 'viengoos/object.h')
-rw-r--r-- | viengoos/object.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/viengoos/object.h b/viengoos/object.h index 2a304e4..fc8ba1d 100644 --- a/viengoos/object.h +++ b/viengoos/object.h @@ -240,9 +240,10 @@ extern struct object *object_find_soft (struct activity *activity, struct object_policy policy); /* Destroy the object OBJECT. Any changes must have already been - flushed to disk. LRU_LOCK must be held. Does NOT release the - memory. It is the caller's responsibility to ensure that - memory_frame_free is eventually called. */ + flushed to disk. LRU_LOCK must not be held, this function will + take it. Does NOT release the memory. It is the caller's + responsibility to ensure that memory_frame_free is eventually + called. */ extern void memory_object_destroy (struct activity *activity, struct object *object); @@ -335,7 +336,8 @@ object_desc_unmap (struct object_desc *desc) is NULL, detaches DESC from lists (this functionality should only be used by memory_object_destroy). If UPDATE_ACCOUNTING is not true, it is the caller's responsibility to update the accounting - information for the old owner and the new owner. */ + information for the old owner and the new owner. LRU_LOCK must be + held. */ extern void object_desc_claim (struct activity *activity, struct object_desc *desc, struct object_policy policy, |