summaryrefslogtreecommitdiffstats
path: root/lib/qpnexus.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/qpnexus.c')
-rw-r--r--lib/qpnexus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/qpnexus.c b/lib/qpnexus.c
index 0f949443..5a5c5417 100644
--- a/lib/qpnexus.c
+++ b/lib/qpnexus.c
@@ -122,7 +122,6 @@ qpn_exec(qpn_nexus qpn)
if (qpn->main_thread)
{
/* Run the state machine in calling thread */
- qpn->thread_id = qpt_thread_self();
qpn->start(qpn);
}
else
@@ -143,6 +142,8 @@ qpn_start_main(void* arg)
qtime_mono_t now;
sigset_t newmask;
+ qpn->thread_id = qpt_thread_self();
+
/* Main thread, block the message queue's signal */
sigemptyset (&newmask);
sigaddset (&newmask, SIGMQUEUE);
@@ -188,6 +189,8 @@ qpn_start_bgp(void* arg)
mqueue_block mqb;
sigset_t newmask;
+ qpn->thread_id = qpt_thread_self();
+
/*
* Not main thread. Block most signals, but be careful not to
* defer SIGTRAP because doing so breaks gdb, at least on