codeowners update
[mono.git] / libgc / alloc.c
index b6bc1832c994da99c04ecbaa475200159c9103f4..2ffafd441d7ed48dde9265fb787ffb92c6ba806c 100644 (file)
@@ -644,9 +644,17 @@ GC_stop_func stop_func;
    }
 }
 
-void (*GC_notify_event) GC_PROTO((GCEventType e));
+void (*GC_notify_event) GC_PROTO((GC_EventType e));
 void (*GC_on_heap_resize) GC_PROTO((size_t new_size));
 
+GC_API void GC_set_on_collection_event (void (*fn) (GC_EventType))
+{
+       DCL_LOCK_STATE;
+       LOCK();
+       GC_notify_event = fn;
+       UNLOCK();
+}
+
 /* Finish up a collection.  Assumes lock is held, signals are disabled,        */
 /* but the world is otherwise running.                                 */
 void GC_finish_collection()