thread, real_thread ? "real" : "FSM"));
#if defined(SILC_DEBUG)
- assert(!fsm->thread);
+ SILC_ASSERT(!fsm->thread);
#endif /* SILC_DEBUG */
thread->fsm_context = thread_context;
#if defined(SILC_DEBUG)
/* We must be finished */
- assert(f->finished);
+ SILC_ASSERT(f->finished);
/* Machine must not have active threads */
if (!f->thread && f->u.m.threads)
- assert(f->u.m.threads == 0);
+ SILC_ASSERT(f->u.m.threads == 0);
#endif /* SILC_DEBUG */
if (!f->thread && f->u.m.lock)
SilcFSM silc_fsm_get_machine(SilcFSMThread thread)
{
- assert(thread->thread);
+ SILC_ASSERT(thread->thread);
return (SilcFSM)thread->u.t.fsm;
}
SilcFSM t = thread;
#if defined(SILC_DEBUG)
- assert(t->thread);
+ SILC_ASSERT(t->thread);
#endif /* SILC_DEBUG */
if (t->finished)
/* Finish the state machine */
SILC_LOG_DEBUG(("State finish %p", fsm));
#if defined(SILC_DEBUG)
- assert(!fsm->finished);
+ SILC_ASSERT(!fsm->finished);
#endif /* SILC_DEBUG */
fsm->finished = TRUE;
{
SILC_LOG_DEBUG(("Initializing semaphore %p", sema));
#if defined(SILC_DEBUG)
- assert(!fsm->thread);
+ SILC_ASSERT(!fsm->thread);
#endif /* SILC_DEBUG */
memset(sema, 0, sizeof(*sema));
sema->fsm = fsm;
SilcFSM entry;
silc_list_start(sema->waiters);
while ((entry = silc_list_get(sema->waiters)) != SILC_LIST_END)
- assert(entry != fsm);
+ SILC_ASSERT(entry != fsm);
#endif /* SILC_DEBUG */
SILC_LOG_DEBUG(("Waiting for semaphore %p", sema));