Added function comment for gc_mark_gray2

This commit is contained in:
Justin Ethier 2016-01-20 22:44:30 -05:00
parent 232498bd8e
commit b560fda1c2

8
gc.c
View file

@ -826,6 +826,14 @@ void gc_mark_gray(gc_thread_data *thd, object obj)
} }
} }
/**
* Add a pending write to the mark buffer.
* These are pended because they are written in a batch during minor GC.
* To prevent race conditions we wait until all of the writes are made before
* updating last write.
*
* TODO: figure out a new name for this function.
*/
void gc_mark_gray2(gc_thread_data *thd, object obj) void gc_mark_gray2(gc_thread_data *thd, object obj)
{ {
if (is_object_type(obj) && mark(obj) == gc_color_clear) { if (is_object_type(obj) && mark(obj) == gc_color_clear) {