diff options
author | neal <neal> | 2008-02-05 16:25:16 +0000 |
---|---|---|
committer | neal <neal> | 2008-02-05 16:25:16 +0000 |
commit | ceea3470514e86e16eef4eafb29bbb7b59d3474d (patch) | |
tree | d6262b34c58f445c864df61e6d48209e7ab23a2b /viengoos/thread.h | |
parent | 60da6359a9d64ed41a9ec7d80b8af0b8ec5000be (diff) |
hurd/
2008-02-05 Neal H. Walfield <neal@gnu.org>
* folio.h (struct folio) [RM_INTERN]: Remove field dhazard,
mhazard. Add field checksums. Rearrange data structure.
(folio_object_type): New function.
(folio_object_type_set): Likewise.
(folio_object_policy): Likewise.
(folio_object_policy_set): Likewise.
[RM_INTERN]: Include <bit-array.h>.
(folio_object_wait_queue_p) [RM_INTERN]:New function.
(folio_object_wait_queue_p_set) [RM_INTERN]:Likewise.
(folio_object_wait_queue) [RM_INTERN]:Likewise.
(folio_object_wait_queue_set) [RM_INTERN]:Likewise.
(folio_object_version) [RM_INTERN]:Likewise.
(folio_object_version_set) [RM_INTERN]:Likewise.
(folio_object_content) [RM_INTERN]:Likewise.
(folio_object_content_set) [RM_INTERN]:Likewise.
viengoos/
2008-02-05 Neal H. Walfield <neal@gnu.org>
* thread.h (struct wait_queue_node): Remove structure.
(struct thread): Add field wait_queue_p. Make the wait queue next
and previous pointers oid_t's and not struct cap's. Update users.
* object.h (object_oid): New function.
* as.c (as_build_internal): Don't access a folio's fields
directly; use the accessor functions.
* cap.c (cap_shootdown): Likewise.
* cap-lookup.c (lookup): Likewise.
* object.c (memory_object_destroy): Likewise.
(object_find): Likewise.
(folio_free): Likewise.
(folio_object_alloc): Likewise.
(object_wait_queue): Remove function.
(object_wait_queue_head): Don't access a folio's fields directly;
use the accessor functions. Update implementation to reflect
struct thread changes.
(object_wait_queue_tail): Likewise.
(object_wait_queue_next): Likewise.
(object_wait_queue_prev): Likewise.
(object_wait_queue_check): Likewise.
(object_wait_queue_enqueue): Likewise.
(object_wait_queue_dequeue): Likewise.
* object.h (folio_object_wait_queue_for_each): Likewise.
Diffstat (limited to 'viengoos/thread.h')
-rw-r--r-- | viengoos/thread.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/viengoos/thread.h b/viengoos/thread.h index 3e0baf9..cb5900f 100644 --- a/viengoos/thread.h +++ b/viengoos/thread.h @@ -35,12 +35,6 @@ enum THREAD_SLOTS = 3, }; -struct wait_queue_node -{ - struct cap next; - struct cap prev; -}; - enum { /* THREAD is blocked on an object wait for a futex. @@ -82,6 +76,11 @@ struct thread /* Whether the thread has been commissioned (a tid allocated). */ uint32_t commissioned : 1; + /* Whether the object is attached to a wait queue. (This is + different from the value of folio_object_wait_queue_p which + specifies if there are objects on this thread's wait queue.) */ + bool wait_queue_p; + /* Whether this thread is the head of the wait queue. If so, WAIT_QUEUE.PREV designates the object. */ uint32_t wait_queue_head : 1; @@ -95,8 +94,15 @@ struct thread /* More information about the reason. */ uint32_t wait_reason_arg; - /* The object the thread is waiting on. */ - struct wait_queue_node wait_queue; + /* The object the thread is waiting on. Only meaningful if + WAIT_QUEUE_P is true. */ + struct + { + /* We don't need versioning as we automatically collect on object + destruction. */ + oid_t next; + oid_t prev; + } wait_queue; }; /* The hardwired base of the UTCB (2.5GB). */ |