aboutsummaryrefslogtreecommitdiff
path: root/runtime/GC/GCInterface.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-17 03:32:33 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-17 03:32:33 +0000
commit8b2e1419cf24a33df5a87c99e367528b44dc28cf (patch)
treedfa50da1818a1e9c1d0588c060051c65583821a3 /runtime/GC/GCInterface.h
parentb2b9c20b6121a54a41ee1c583a4bff4389622da2 (diff)
Undo removal of the runtime libraries. While this may have been a bit
premature, these libraries will be going away for the 2.0 release. Other arrangements for profiling, gc, etc. should be made in the next few months. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/GC/GCInterface.h')
-rw-r--r--runtime/GC/GCInterface.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/runtime/GC/GCInterface.h b/runtime/GC/GCInterface.h
new file mode 100644
index 0000000000..4eb48183bc
--- /dev/null
+++ b/runtime/GC/GCInterface.h
@@ -0,0 +1,48 @@
+/*===-- GCInterface.h - Public interface exposed by garbage collectors ----===*\
+|*
+|* The LLVM Compiler Infrastructure
+|*
+|* This file was developed by the LLVM research group and is distributed under
+|* the University of Illinois Open Source License. See LICENSE.TXT for details.
+|*
+|*===----------------------------------------------------------------------===*|
+|*
+|* This file defines the common public interface that must be exposed by all
+|* LLVM garbage collectors.
+|*
+\*===----------------------------------------------------------------------===*/
+
+#ifndef GCINTERFACE_H
+#define GCINTERFACE_H
+
+/* llvm_cg_walk_gcroots - This function is exposed by the LLVM code generator,
+ * and allows us to traverse the roots on the stack.
+ */
+void llvm_cg_walk_gcroots(void (*FP)(void **Root, void *Meta));
+
+
+/* llvm_gc_initialize - This function is called to initalize the garbage
+ * collector.
+ */
+void llvm_gc_initialize(unsigned InitialHeapSize);
+
+/* llvm_gc_allocate - This function allocates Size bytes from the heap and
+ * returns a pointer to it.
+ */
+void *llvm_gc_allocate(unsigned Size);
+
+/* llvm_gc_collect - This function forces a garbage collection cycle.
+ */
+void llvm_gc_collect();
+
+/* llvm_gc_read - This function should be implemented to include any read
+ * barrier code that is needed by the garbage collector.
+ */
+void *llvm_gc_read(void *ObjPtr, void **FieldPtr);
+
+/* llvm_gc_write - This function should be implemented to include any write
+ * barrier code that is needed by the garbage collector.
+ */
+void llvm_gc_write(void *V, void *ObjPtr, void **FieldPtr);
+
+#endif