ipc:call   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define ipc:call
  (lambda (process . args)
    (let* ((callback-proc (ipc:get-process-name))
           (func (if (string? (car args))
                     (begin (set! callback-proc (car args))
                            (set! args (cdr args))
                            (car args))
                     (car args))))
      (let loop ((i *ipc:active-label-cnt*))
        (if (not (null? (vector-ref *ipc:active-labels* i)))
            (loop (modulo (+ i 1) *ipc:active-label-buffer-size*))
            (set! *ipc:active-label-cnt* i)))
      (apply ipc:call-async process 'ipc:sync-receive callback-proc
             *ipc:active-label-cnt* func (cdr args))
      (let ((return-val (call/cc (lambda (k)
                                   (vector-set! *ipc:active-labels* *ipc:active-label-cnt* k)
                                   (*sys:toplevel-continuation* 0)))))
        return-val))))


Back to Index

Similar Entries

  • PaStreamCallbackTimeInfo_print    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • PaStreamCallbackTimeInfo_toString    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • _gst_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mediaplayer.xtm
  • _playbin_bus_call:GstBusFunc    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mediaplayer.xtm
  • audio_callback:PaStreamCallback    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/portaudio.xtm
  • audio_callback:PaStreamCallback    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/portaudio.xtm
  • call-as-xtlang    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • call-as-xtlang-leaky    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • call-cpp    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • call-with-input-file    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • call-with-output-file    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • call/cc    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • call_object    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • callback    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • callback-adapter    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • callback-test2-helper    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • callback_goodbye_world    xtlang    /digego/extempore/tree/v0.8.9/examples/external/ulfius.xtm
  • callback_hello_world    xtlang    /digego/extempore/tree/v0.8.9/examples/external/ulfius.xtm
  • clock_scheduler_main_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • curl_write_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • glfw_char_callback:GLFWcharfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_cursor_position_callback:GLFWcursorposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_error_callback:GLFWerrorfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_key_callback:GLFWkeyfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_mouse_button_callback:GLFWmousebuttonfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_window_focus_callback:GLFWwindowfocusfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_window_position_callback:GLFWwindowposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • godot_call    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • godot_call    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • godot_call    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • godot_call    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • godot_method_bind_call    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • godot_method_bind_ptrcall    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • gui_window_size_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • impc:ir:compiler:callback    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ir:compiler:fptrcall    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ir:compiler:native-call    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ir:function-calling-convention    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ti:callback    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:callback-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:closure-call-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:fptrcall-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:fptrcall-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • ipc:mapcall    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • listener-callback    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • playbin_bus_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • playbin_bus_call:GstBusFunc    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • rtmidi_default_callback:RtMidiCCallback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • rtmidi_register_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • stbi_flip_vertically    xtlang    /digego/extempore/tree/v0.8.9/libs/external/stb_image.xtm
  • thread_native_call    xtlang    /digego/extempore/tree/v0.8.9/libs/core/xthread.xtm
  • thread_native_call_with_zone    xtlang    /digego/extempore/tree/v0.8.9/libs/core/xthread.xtm