Exemplo n.º 1
0
static void
freeEvent(Event ev)
{ unlinkEvent(ev);

  if ( ev->goal )
    PL_erase(ev->goal);

  ev->magic = 0;

  free(ev);
}
Exemplo n.º 2
0
static int
uninstallEvent(Event ev)
{ LOCK();
  if ( TheSchedule()->scheduled == ev )
    ev->flags |= EV_DONE;
  unlinkEvent(ev);
  ev->flags &= ~(EV_FIRED|EV_DONE);
  UNLOCK();

  pthread_cond_signal(&cond);

  return TRUE;
}
Exemplo n.º 3
0
void MidiEvent::linkEvent(MidiEvent* mev) {
	if (mev->m_eventlink != NULL) {
		// unlink other event if it is linked to something else;
		mev->unlinkEvent();
	}
	// if this is already linked to something else, then unlink:
	if (m_eventlink != NULL) {
		m_eventlink->unlinkEvent();
	}
	unlinkEvent();

	mev->m_eventlink = this;
	m_eventlink = mev;
}