projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93b2224
)
Finish real thread FSM after thread scheduler has finished.ยง
author
Pekka Riikonen
<priikone@silcnet.org>
Thu, 2 Nov 2006 08:07:57 +0000
(08:07 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Thu, 2 Nov 2006 08:07:57 +0000
(08:07 +0000)
lib/silcutil/silcfsm.c
patch
|
blob
|
history
diff --git
a/lib/silcutil/silcfsm.c
b/lib/silcutil/silcfsm.c
index 2c95ccd19f110fdba9503f376b1508d7cd079f95..caab3380802042110925832355c5a6da2e856a15 100644
(file)
--- a/
lib/silcutil/silcfsm.c
+++ b/
lib/silcutil/silcfsm.c
@@
-369,11
+369,9
@@
SILC_TASK_CALLBACK(silc_fsm_run)
fsm->finished = TRUE;
/* If we are thread and using real threads, the FSM thread will finish
fsm->finished = TRUE;
/* If we are thread and using real threads, the FSM thread will finish
-
in the main thread, not in the created
thread. */
+
after the real thread has finished, in the main
thread. */
if (fsm->thread && fsm->real_thread) {
silc_schedule_stop(fsm->schedule);
if (fsm->thread && fsm->real_thread) {
silc_schedule_stop(fsm->schedule);
- silc_schedule_task_add_timeout(app_context, silc_fsm_finish, fsm, 0, 1);
- silc_schedule_wakeup(app_context);
break;
}
break;
}
@@
-698,5
+696,10
@@
static void *silc_fsm_thread(void *context)
fsm->schedule = old;
fsm->schedule = old;
+ /* Finish the FSM thread in the main thread */
+ SILC_ASSERT(fsm->finished);
+ silc_schedule_task_add_timeout(fsm->schedule, silc_fsm_finish, fsm, 0, 1);
+ silc_schedule_wakeup(fsm->schedule);
+
return NULL;
}
return NULL;
}