void coroutine_base::resume_coroutine(coroutine_ptr other) { logDebug("yield %d --> %d", m_id, other->m_id); logAssert(this != other.get()); logAssert(!other->m_active); logAssert(!other->m_blocked); m_active = false; other->m_active = true; scheduler_t::self()->set_current(other); swapcontext(&m_ctx, &other->m_ctx); }
int main (int argc, char *argv[]) { int x = 3; logWarn(logStderr,"Hello"); logFatal(logStderr,"Hello (fatal)"); x+=4; { utlAssume(sizeof(short) == 2); utlAssume(sizeof(int) == sizeof(long)); utlAssume(sizeof(unsigned int) == sizeof(long)); x -=2; } printf("%d\n",sizeof(log_abbrev)); logAssert(logStderr, x>0 ); logAssert(logStderr, x<0 ); exit(0); }