File: scheme48write-barrier.h

package info (click to toggle)
scheme48 1.8%2Bdfsg-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 14,984 kB
file content (34 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
   See file COPYING. */

#ifdef S48_GC_BIBOP
#ifdef __COMPILING_SCHEME48_ITSELF__

/* The VM has only a few occurrences, which we want to inline. */

#include "area_roots.h"

#define S48_WRITE_BARRIER(stob, address, value) \
  s48_write_barrier_inline((stob), (address), (value))

#else

/*
 * For external code, the inlined version may be too hefty.  Use the
 * separate version here.
 */

extern void s48_write_barrier(long stob, char* address, long value);

#define S48_WRITE_BARRIER(stob, address, value) \
  s48_write_barrier((stob), (address), (value))
#endif

#elif defined(S48_GC_TWOSPACE)
/*
 * No write barrier is needed for the two-space collector;
 */

#define	S48_WRITE_BARRIER(stob, address, value)	((void)0)

#endif