summaryrefslogtreecommitdiff
path: root/libhurd-mm/exceptions.c
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 /libhurd-mm/exceptions.c
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.
Diffstat (limited to 'libhurd-mm/exceptions.c')
-rw-r--r--libhurd-mm/exceptions.c7
1 files changed, 6 insertions, 1 deletions
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;