scheduler_evt   xtlang

Defined in:


(bind-func scheduler_evt:[void,[i64,!a]*,!a,i8*]*
  (let ((evtlist:SchedEvt* null)
        (next:SchedEvt* null)
        (new:SchedEvt* null))
    (lambda (scheduler time fname)
      ;; (println "sched:" scheduler time fname data)
      (if (= (thread_equal_self (scheduler.thread)) 0)
          (mutex_lock (scheduler.mutex)))
      (set! evtlist (scheduler_at (scheduler.evtlist) time))
      (if (null? evtlist)
            (set! next (scheduler.evtlist))
            (set! new (SchedEvt_h time fname null next))
            (scheduler.evtlist new)
            (set! next (tref evtlist 3)) ;; get next from previous
            (set! new (SchedEvt_h time fname evtlist next))
            (tset! evtlist 3 new) ;; make us next of previous
            (if (not (null? next)) (tset! next 2 new)) ;; set us to previous of next
      (if (= (thread_equal_self (scheduler.thread)) 0)
          (mutex_unlock (scheduler.mutex)))

Back to Index

Similar Entries

  • beat_scheduler    xtlang
  • clock_scheduler    xtlang
  • clock_scheduler_main_callback    xtlang
  • get_midi_evt_a    xtlang
  • get_midi_evt_b    xtlang
  • get_midi_evt_channel    xtlang
  • get_midi_evt_clocktime    xtlang
  • get_midi_evt_timestamp    xtlang
  • get_midi_evt_type    xtlang
  • scheduler_at    xtlang
  • scheduler_init    xtlang
  • start_midi_scheduler    xtlang