scheme48vm.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Externally visible objects defined in scheme48vm.c.
  3. */
  4. #include "scheme48.h"
  5. #include "c-mods.h"
  6. /* initializing */
  7. extern void s48_init(void);
  8. extern void s48_initialize_vm(char *, long);
  9. /* running */
  10. extern long s48_call_startup_procedure(char **, long);
  11. extern s48_value s48_restart(s48_value proc, long nargs);
  12. extern s48_value s48_Scallback_return_stack_blockS;
  13. /* for extension.c */
  14. extern void s48_set_extension_valueB(s48_value);
  15. extern s48_value s48_Sextension_valueS;
  16. /* interrupts */
  17. extern void s48_note_event(void);
  18. extern bool s48_Spending_eventsPS;
  19. extern char * s48_Sstack_limitS;
  20. extern void s48_disable_interruptsB(void);
  21. extern void s48_enable_interruptsB(void);
  22. extern void s48_set_os_signals(s48_value list);
  23. extern void s48_reset_interruptsB();
  24. /* imported and exported bindings */
  25. extern void s48_define_exported_binding(char *, s48_value);
  26. extern s48_value s48_get_imported_binding(char *);
  27. /* for raising exceptions in external code */
  28. extern void s48_setup_external_exception(s48_value exception,
  29. long nargs);
  30. extern s48_value s48_resetup_external_exception(s48_value exception,
  31. long additional_nargs);
  32. extern void s48_push(s48_value value);
  33. extern s48_value s48_stack_ref(long offset);
  34. extern void s48_stack_setB(long offset, s48_value value);
  35. /* called when writing an image */
  36. extern s48_value s48_symbol_table(void);
  37. extern s48_value *s48_channels(void);
  38. extern long s48_channel_count(void);
  39. extern s48_value s48_imported_bindings(void);
  40. extern s48_value s48_exported_bindings(void);
  41. /* called when resuming an image */
  42. extern bool s48_warn_about_undefined_imported_bindings(void);
  43. /* for initializion on SMP machines */
  44. extern void s48_initialize_shared_registersB(long, long, long, long);
  45. /* manipulating channels */
  46. extern void s48_close_channel(long);
  47. extern s48_value s48_set_channel_os_index(s48_value, long);
  48. extern s48_value s48_really_add_channel(s48_value, s48_value, long);
  49. /* external allocation and GC roots */
  50. extern void s48_gc_root(void);
  51. extern s48_value s48_allocate_stob(long type, long size);
  52. extern void s48_push_gc_rootsB(char *, long);
  53. extern bool s48_pop_gc_rootsB(void);
  54. extern char * s48_set_gc_roots_baseB(void);
  55. extern bool s48_release_gc_roots_baseB(char *);
  56. extern void s48_register_gc_rootB(char *marker);
  57. extern void s48_reset_external_rootsB(void);
  58. extern void s48_post_gc_cleanup(void);
  59. /* for native code */
  60. extern void s48_copy_stack_into_heap();
  61. /* variables for native code (the names need to be fixed) */
  62. extern s48_value StemplateS;
  63. extern char * Scode_pointerS;
  64. extern char * ScontS;
  65. extern char * SstackS;
  66. extern s48_value SenvS;
  67. extern s48_value SvalS;
  68. extern long s48_Snative_protocolS;