[gc] Replace domain finalizer request cond+mutex by a semaphore
[mono.git] / mono / sgen / sgen-copy-object.h
index 016fc462e0e762772ccbb9f6701eaf4c583937af..3579d09bae865777c4bb114fbc6370dd161f54df 100644 (file)
@@ -8,6 +8,27 @@
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
+/*
+ * Defines
+ *
+ *     GCObject* copy_object_no_checks (GCObject *obj, SgenGrayQueue *queue)
+ *
+ * which allocates new space for `obj`, copies it there, forwards `obj` to its new location,
+ * and enqueues the copy into `queue`.
+ *
+ * To be defined by the includer:
+ *
+ *     COLLECTOR_SERIAL_ALLOC_FOR_PROMOTION(vt, obj, objsize, has_refs)
+ *
+ * Allocates space for promoting object `obj`, with size `objsize`, and initizializes the
+ * vtable with `vt`.  `has_refs` indicates whether the object contains references.
+ *
+ *     collector_pin_object(obj, queue)
+ *
+ * Called when no space for `obj` could be allocated.  It must pin `obj` and enqueue it into
+ * `queue` for scanning.
+ */
+
 extern guint64 stat_copy_object_called_nursery;
 extern guint64 stat_objects_copied_nursery;
 
@@ -73,3 +94,6 @@ copy_object_no_checks (GCObject *obj, SgenGrayQueue *queue)
 
        return (GCObject *)destination;
 }
+
+#undef COLLECTOR_SERIAL_ALLOC_FOR_PROMOTION
+#undef collector_pin_object