scheduler_init   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm

Implementation

(bind-func scheduler_init:[[i64,!a]*,SchedEvt{!a}*,[void,!a]*]*
  (lambda (el f)
    (let ((mutex:i8* (mutex_create))
          (thread:i8* (thread_self))
          (cnt 0)
          (evtlist:SchedEvt* el)
          (fp:[void,!a]* f)
          (element:SchedEvt* null)
          (next:SchedEvt* null)
          (prev:SchedEvt* null))
      (lambda (time)
        (set! cnt 0)
        (mutex_lock mutex)
        (set! element evtlist)
        (while (and (not (null? element))
                    (<= (tref element 0) time))
          (set! cnt (+ cnt 1))
          (set! fp (cast (llvm_get_function_ptr (tref element 1))))
          ;; (println "exec: " time ":" (tref element 0))
          (fptrcall fp (tref element 0)) ; (tref element 2))
          (set! next (tref element 3))
          (set! prev (tref element 2))
          (if (null? prev)
              (set! evtlist next)
              (tset! prev 3 next))
          (if (not (null? next)) (tset! next 2 prev))
          (free element)
          (set! element next))
        (mutex_unlock mutex)
        cnt))))


Back to Index

Similar Entries

  • apr_init    xtlang
  • beat_scheduler    xtlang
  • cef_init_app    xtlang
  • cef_init_base    xtlang
  • cef_init_browser    xtlang
  • cef_init_client    xtlang
  • cl:reduce-init    scheme
  • clock_scheduler    xtlang
  • clock_scheduler_main_callback    xtlang
  • glew_init    xtlang
  • glfw_init    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • gui_init    xtlang
  • h3d_init    xtlang
  • h3d_init    xtlang
  • impc:compiler:print-no-redefinitions-error    scheme
  • impc:ti:initialize-closure-with-new-zone    scheme
  • init-gst    xtlang
  • init-osc-vars    xtlang
  • init-psys    xtlang
  • init-slides    scheme
  • init_bodies    xtlang
  • init_burners    xtlang
  • init_draw_quad    xtlang
  • init_env_map    xtlang
  • init_gl    xtlang
  • init_globals    xtlang
  • init_lv2_amp    xtlang
  • init_sample_data    xtlang
  • init_sample_data    xtlang
  • init_sky    xtlang
  • init_vao    xtlang
  • init_vg    xtlang
  • initalize    xtlang
  • initialize_walkers    xtlang
  • lilv_init_world    xtlang
  • node_reply_socket_init    xtlang
  • nvg_init    xtlang
  • pa_initialize    xtlang
  • pm_initialize    xtlang
  • pm_initialize    unknown
  • scheduler_at    xtlang
  • scheduler_evt    xtlang
  • some_gl_init    xtlang
  • start_midi_scheduler    xtlang
  • sys:compile-init-ll    scheme
  • sys:compile-init-ll-from-str    scheme
  • world_init    xtlang
  • xtm_envmap_init    xtlang
  • xtm_render_init    xtlang
  • xtm_render_init_dof_shader    xtlang
  • xtm_render_init_light_shader    xtlang
  • xtm_render_init_quad_shader    xtlang
  • xtm_render_init_simple_bone_shader    xtlang
  • xtm_render_init_simple_shader    xtlang
  • xtm_render_init_skybox_shader    xtlang
  • xtm_skybox_init    xtlang