int FliTimedCbHdl::arm_callback(void) { mti_ScheduleWakeup(m_proc_hdl, m_time_ps); m_sensitised = true; set_call_state(GPI_PRIMED); return 0; }
static void schedule_testpoint( inst_rec_ptr ip, int portnum, char *values, int time, int type ) { static testpoint *last_testpoint; int now; testpoint *this_testpoint; /* Create a new testpoint. */ this_testpoint = (testpoint *) mti_Malloc(sizeof(testpoint)); this_testpoint->type = type; this_testpoint->portnum = portnum; this_testpoint->test_val = (char*)mti_Malloc(strlen(values)+1); strcpy(this_testpoint->test_val, values); /* Link in the new testpoint on the end of the list. */ if ( ! testpoints ) { testpoints = this_testpoint; } else { last_testpoint->nxt = this_testpoint; } this_testpoint->nxt = NULL; last_testpoint = this_testpoint; /* Schedule a wakeup at this time to check the value then. */ now = mti_Now(); mti_ScheduleWakeup( ip->test_values, abs(time-now) ); }
int FliSimPhaseCbHdl::arm_callback(void) { if (NULL == m_proc_hdl) { LOG_DEBUG("Creating a new process to sensitise with priority %d", m_priority); m_proc_hdl = mti_CreateProcessWithPriority(NULL, handle_fli_callback, (void *)this, m_priority); } if (!m_sensitised) { mti_ScheduleWakeup(m_proc_hdl, 0); m_sensitised = true; } set_call_state(GPI_PRIMED); return 0; }