diff options
author | neal <neal> | 2008-01-16 22:23:09 +0000 |
---|---|---|
committer | neal <neal> | 2008-01-16 22:23:09 +0000 |
commit | 884a51902cf63c2bb138468a8d65d394ab338070 (patch) | |
tree | 03756ada622dcad6a453f8baa74eae5141e1f295 /viengoos/thread.h | |
parent | dd96b569ae620aaeab26b2cb49f425caf04c0ab5 (diff) |
hurd/
2008-01-16 Neal H. Walfield <neal@gnu.org>
* thread.h (RM_thread_wait_object_destroyed): New define.
(thread_wait_object_destroyed): New method.
* folio.h (folio_object_alloc): Take additional parameter
return_code.
viengoos/
2008-01-16 Neal H. Walfield <neal@gnu.org>
* thread.h (THREAD_WAIT_FUTEX): New define.
(THREAD_WAIT_DESTROY): Likewise.
(struct thread): Remove fields futex_block and futex_offset. Add
fields wait_reason and wait_reason_arg. Update users.
* object.h (folio_object_alloc): Take additional argument
return_code. Update users.
(folio_object_wait_queue_for_each): New macro.
* object.c: Include <hurd/thread.h>.
(folio_object_alloc): Take additional argument return_code.
Wake any threads blocked on the object being destroyed.
* server.c (server_loop): Update folio_object_alloc method
implementation to new API. Pass RETURN_CODE to the call to
folio_object_alloc. Implement the thread_wait_object_destroyed
method.
* t-activity.c (allocate_object): Update rm_folio_object_alloc use to
reflect API changes.
(test): Likewise.
* t-as.c (allocate_object): Likewise.
libhurd-mm/
2008-01-16 Neal H. Walfield <neal@gnu.org>
* storage.c (shadow_setup): Update rm_folio_object_alloc use to
reflect API changes.
(storage_alloc_): Likewise.
(storage_free_): Likewise.
ruth/
2008-01-16 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Update rm_folio_object_alloc use to reflect API
changes. Add test case for thread_wait_object_destroy.
Diffstat (limited to 'viengoos/thread.h')
-rw-r--r-- | viengoos/thread.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/viengoos/thread.h b/viengoos/thread.h index b7ab288..3e0baf9 100644 --- a/viengoos/thread.h +++ b/viengoos/thread.h @@ -41,6 +41,17 @@ struct wait_queue_node struct cap prev; }; +enum + { + /* THREAD is blocked on an object wait for a futex. + WAIT_REASON_ARG holds the byte offset in the object on which it + is waiting. */ + THREAD_WAIT_FUTEX, + /* THREAD is blocked on an object waiting for the object to be + destroyed. */ + THREAD_WAIT_DESTROY, + }; + struct thread { /* User accessible fields. */ @@ -79,10 +90,10 @@ struct thread WAIT_QUEUE.NEXT designates the object. */ uint32_t wait_queue_tail : 1; - /* If waiting on a futex object. */ - uint32_t futex_block : 1; - /* The offset of the futex object. */ - uint32_t futex_offset : PAGESIZE_LOG2; + /* The event the thread is interested in. */ + uint32_t wait_reason : 28; + /* More information about the reason. */ + uint32_t wait_reason_arg; /* The object the thread is waiting on. */ struct wait_queue_node wait_queue; |