[sgen] Make hazard pointer stuff work without Mono, enabling concurrent M&S.
[mono.git] / mono / utils / hazard-pointer.c
index 6890db2941ae5bd65f1b7758a67c2ba25432321d..ced9cdad63dc9015800cd2eb38bd621646002df6 100644 (file)
@@ -6,16 +6,24 @@
 
 #include <config.h>
 
+#include <string.h>
+
 #include <mono/utils/hazard-pointer.h>
 #include <mono/utils/mono-membar.h>
 #include <mono/utils/mono-memory-model.h>
-#include <mono/utils/mono-mmap.h>
 #include <mono/utils/monobitset.h>
-#include <mono/utils/mono-threads.h>
 #include <mono/utils/lock-free-array-queue.h>
-#include <mono/utils/mono-counters.h>
 #include <mono/utils/atomic.h>
+#include <mono/utils/mono-mutex.h>
+#ifdef SGEN_WITHOUT_MONO
+#include <mono/metadata/sgen-gc.h>
+#include <mono/metadata/sgen-client.h>
+#else
+#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-threads.h>
+#include <mono/utils/mono-counters.h>
 #include <mono/io-layer/io-layer.h>
+#endif
 
 typedef struct {
        gpointer p;