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    /digego/extempore/tree/v0.8.9/libs/external/apr.xtm
  • beat_scheduler    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • cef_init_app    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_base    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_browser    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_client    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cl:reduce-init    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • clock_scheduler    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • clock_scheduler_main_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • glew_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/glew.xtm
  • glfw_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_interaction_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • gui_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • h3d_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • h3d_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • impc:compiler:print-no-redefinitions-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:initialize-closure-with-new-zone    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • init-gst    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • init-osc-vars    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • init-psys    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/particles.xtm
  • init-slides    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • init_bodies    xtlang    /digego/extempore/tree/v0.8.9/examples/core/nbody_lang_shootout.xtm
  • init_burners    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • init_draw_quad    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • init_env_map    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • init_gl    xtlang    /digego/extempore/tree/v0.8.9/examples/external/going-native.xtm
  • init_globals    xtlang    /digego/extempore/tree/v0.8.9/examples/core/fasta_lang_shootout.xtm
  • init_lv2_amp    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/lv2.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • init_sky    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • init_vao    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • init_vg    xtlang    /digego/extempore/tree/v0.8.9/examples/external/going-native.xtm
  • initalize    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/hidapi.xtm
  • initialize_walkers    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mpi/random-walk.xtm
  • lilv_init_world    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/lilv.xtm
  • node_reply_socket_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • nvg_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanovg.xtm
  • pa_initialize    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • pm_initialize    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • pm_initialize    unknown    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • scheduler_at    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • scheduler_evt    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • some_gl_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • start_midi_scheduler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • sys:compile-init-ll    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • sys:compile-init-ll-from-str    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • world_init    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • xtm_envmap_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_dof_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_light_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_quad_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_simple_bone_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_simple_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_skybox_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_skybox_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm