summaryrefslogtreecommitdiff
path: root/hurd/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/thread.h')
-rw-r--r--hurd/thread.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hurd/thread.h b/hurd/thread.h
index 653bbf6..1ca8ebe 100644
--- a/hurd/thread.h
+++ b/hurd/thread.h
@@ -259,8 +259,16 @@ extern void hurd_fault_catcher_unregister (struct hurd_fault_catcher *catcher);
static inline vg_thread_id_t
hurd_myself (void)
{
+#ifdef USE_L4
+ /* XXX: Annoyingly, we need the tid before UTCB->TID is initialized.
+ This needs to be fixed, but for now... */
+ return l4_myself ();
+#endif
struct hurd_utcb *utcb = hurd_utcb ();
+ assert (utcb);
+ assert (utcb->tid);
+
return utcb->tid;
}