#include <math.h>
#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
#include "mono/metadata/sgen-gc.h"
#include "mono/metadata/sgen-protocol.h"
#include "mono/metadata/sgen-workers.h"
#include "mono/metadata/sgen-thread-pool.h"
#include "mono/metadata/sgen-client.h"
+#include "mono/utils/mono-membar.h"
#if defined(ARCH_MIN_MS_BLOCK_SIZE) && defined(ARCH_MIN_MS_BLOCK_SIZE_SHIFT)
#define MS_BLOCK_SIZE ARCH_MIN_MS_BLOCK_SIZE
#include "config.h"
#ifdef HAVE_SGEN_GC
+#include <stdlib.h>
+
#include "mono/metadata/sgen-gc.h"
#include "mono/metadata/sgen-memory-governor.h"
#include "mono/metadata/sgen-thread-pool.h"
#include "mono/metadata/sgen-thread-pool.h"
#include "mono/metadata/sgen-pointer-queue.h"
#include "mono/utils/mono-mutex.h"
+#ifndef SGEN_WITHOUT_MONO
#include "mono/utils/mono-threads.h"
+#endif
static mono_mutex_t lock;
static mono_cond_t work_cond;
#include "config.h"
#ifdef HAVE_SGEN_GC
+#include <string.h>
+
#include "mono/metadata/sgen-gc.h"
#include "mono/metadata/sgen-workers.h"
#include "mono/metadata/sgen-thread-pool.h"
-#include "mono/utils/mono-counters.h"
+#include "mono/utils/mono-membar.h"
#include "mono/metadata/sgen-client.h"
static int workers_num;