scheme48write-barrier.h 795 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
  2. See file COPYING. */
  3. #ifdef S48_GC_BIBOP
  4. #ifdef __COMPILING_SCHEME48_ITSELF__
  5. /* The VM has only a few occurrences, which we want to inline. */
  6. #include "area_roots.h"
  7. #define S48_WRITE_BARRIER(stob, address, value) \
  8. s48_write_barrier_inline((stob), (address), (value))
  9. #else
  10. /*
  11. * For external code, the inlined version may be too hefty. Use the
  12. * separate version here.
  13. */
  14. extern void s48_write_barrier(long stob, char* address, long value);
  15. #define S48_WRITE_BARRIER(stob, address, value) \
  16. s48_write_barrier((stob), (address), (value))
  17. #endif
  18. #elif defined(S48_GC_TWOSPACE)
  19. /*
  20. * No write barrier is needed for the two-space collector;
  21. */
  22. #define S48_WRITE_BARRIER(stob, address, value) ((void)0)
  23. #endif