summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-12-18 15:29:22 +0100
committerNeal H. Walfield <neal@gnu.org>2008-12-18 15:29:22 +0100
commitc489d6e4edbe9614aad02c8e10cbe7682925dc92 (patch)
tree773399aa8177e20b3562a4b863f6d623546712ea
parenta470cb8a86025fe76570badb7f268b08b4969f40 (diff)
Set UTCB->TID when initializing the UTCB, not lazily.
hurd/ 2008-12-18 Neal H. Walfield <neal@gnu.org> * thread.h (hurd_myself): Assume UTCB->TID is set correctly. libhurd-mm/ 2008-12-18 Neal H. Walfield <neal@gnu.org> * exceptions.c (hurd_activation_state_alloc): Set UTCB->TID.
-rw-r--r--hurd/ChangeLog4
-rw-r--r--hurd/thread.h3
-rw-r--r--libhurd-mm/ChangeLog26
-rw-r--r--libhurd-mm/exceptions.c7
4 files changed, 25 insertions, 15 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 62e739c..1082520 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,5 +1,9 @@
2008-12-18 Neal H. Walfield <neal@gnu.org>
+ * thread.h (hurd_myself): Assume UTCB->TID is set correctly.
+
+2008-12-18 Neal H. Walfield <neal@gnu.org>
+
* RPC: Move to ../libviengoos.
2008-12-17 Neal H. Walfield <neal@gnu.org>
diff --git a/hurd/thread.h b/hurd/thread.h
index 94c29e8..aa292ab 100644
--- a/hurd/thread.h
+++ b/hurd/thread.h
@@ -246,9 +246,6 @@ hurd_myself (void)
{
struct hurd_utcb *utcb = hurd_utcb ();
- if (unlikely (utcb->tid == 0))
- utcb->tid = vg_myself ();
-
return utcb->tid;
}
diff --git a/libhurd-mm/ChangeLog b/libhurd-mm/ChangeLog
index e19d1d9..a403cb8 100644
--- a/libhurd-mm/ChangeLog
+++ b/libhurd-mm/ChangeLog
@@ -1,5 +1,20 @@
2008-12-18 Neal H. Walfield <neal@gnu.org>
+ * exceptions.c (hurd_activation_state_alloc): Set UTCB->TID.
+
+2008-12-18 Neal H. Walfield <neal@gnu.org>
+
+ * storage.c (struct storage_desc): Add field owner.
+ (shadow_setup): Set DESC->OWNER appropriately.
+ (storage_alloc): Likewise.
+ (storage_free_): Likewise.
+ (storage_init): Likewise.
+
+ (storage_alloc): Move code that updates DESC to before we call
+ rm_folio_object_alloc. Unlock DESC->LOCK before calling it.
+
+2008-12-18 Neal H. Walfield <neal@gnu.org>
+
* message-buffer.c (num_threads): New function.
(BUFFERS_LOW_WATER): Define in terms of the number of threads.
(BUFFERS_HIGH_WATER): Likewise.
@@ -67,17 +82,6 @@
2008-12-16 Neal H. Walfield <neal@gnu.org>
- * storage.c (struct storage_desc) [!NDEBUG]: Add field owner.
- (shadow_setup): Set DESC->OWNER appropriately.
- (storage_alloc): Likewise.
- (storage_free_): Likewise.
- (storage_init): Likewise.
-
- (storage_alloc): Move code that updates DESC to before we call
- rm_folio_object_alloc. Unlock DESC->LOCK before calling it.
-
-2008-12-16 Neal H. Walfield <neal@gnu.org>
-
* anonymous.c (anonymous_pager_alloc): Replace use of l4_msb with
vg_msb.
* as-build.c (as_build): Replace use of l4_msb64 with vg_msb64.
diff --git a/libhurd-mm/exceptions.c b/libhurd-mm/exceptions.c
index 39d972f..10d932e 100644
--- a/libhurd-mm/exceptions.c
+++ b/libhurd-mm/exceptions.c
@@ -861,7 +861,8 @@ hurd_activation_state_alloc (vg_addr_t thread, struct hurd_utcb **utcbp)
VG_EXREGS_SET_UTCB
| VG_EXREGS_SET_EXCEPTION_MESSENGER,
in, VG_ADDR_VOID, VG_ADDR_VOID,
- VG_PTR_TO_PAGE (utcb), utcb->exception_buffer->receiver,
+ VG_PTR_TO_PAGE (utcb),
+ utcb->exception_buffer->receiver,
&out, NULL, NULL, NULL, NULL);
if (err)
panic ("Failed to install utcb");
@@ -874,6 +875,10 @@ hurd_activation_state_alloc (vg_addr_t thread, struct hurd_utcb **utcbp)
if (err)
panic ("Failed to set messenger's thread");
+ err = vg_thread_id (VG_ADDR_VOID, thread, &utcb->tid);
+ if (err)
+ panic ("Failed to get thread id");
+
check_activation_frame_reserve (utcb);
return 0;