Merge pull request #4618 from BrzVlad/feature-par-nrs
[mono.git] / mono / sgen / sgen-gc.h
index 4ff60166cca9d66ec79ea4e08ea3c306bf0d10be..8cf5a46fa500f40683e1d916f7a8ac08807c2349 100644 (file)
@@ -35,6 +35,7 @@ typedef struct _SgenThreadInfo SgenThreadInfo;
 #include "mono/sgen/sgen-hash-table.h"
 #include "mono/sgen/sgen-protocol.h"
 #include "mono/sgen/gc-internal-agnostic.h"
+#include "mono/sgen/sgen-thread-pool.h"
 
 /* The method used to clear the nursery */
 /* Clearing at nursery collections is the safest, but has bad interactions with caches.
@@ -117,7 +118,7 @@ extern guint64 stat_objects_copied_major;
                g_error (__VA_ARGS__);  \
 } } while (0)
 
-#ifndef HOST_WIN32
+#ifdef HAVE_LOCALTIME_R
 # define LOG_TIMESTAMP  \
        do {    \
                time_t t;                                                                       \
@@ -593,7 +594,7 @@ sgen_update_reference (GCObject **p, GCObject *o, gboolean allow_null)
 {
        if (!allow_null)
                SGEN_ASSERT (0, o, "Cannot update a reference with a NULL pointer");
-       SGEN_ASSERT (0, !sgen_thread_pool_is_thread_pool_thread (mono_native_thread_id_get ()), "Can't update a reference in the worker thread");
+       SGEN_ASSERT (0, !sgen_workers_is_worker_thread (mono_native_thread_id_get ()), "Can't update a reference in the worker thread");
        *p = o;
 }
 
@@ -636,7 +637,6 @@ struct _SgenMajorCollector {
        size_t section_size;
        gboolean is_concurrent;
        gboolean is_parallel;
-       gboolean needs_thread_pool;
        gboolean supports_cardtable;
        gboolean sweeps_lazily;
 
@@ -693,6 +693,7 @@ struct _SgenMajorCollector {
        guint8* (*get_cardtable_mod_union_for_reference) (char *object);
        long long (*get_and_reset_num_major_objects_marked) (void);
        void (*count_cards) (long long *num_total_cards, long long *num_marked_cards);
+       SgenThreadPool* (*get_sweep_pool) (void);
 
        void (*worker_init_cb) (gpointer worker);
 };