AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
- security, lldb, mdb, assert_messages, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac.],
+ security, lldb, mdb, assert_messages, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
AC_MSG_NOTICE([Disabled DllMap in the loader.])
fi
+if test "x$mono_feature_disable_threads" = "xyes"; then
+ AC_DEFINE(DISABLE_THREADS, 1, [Disable Threads])
+ AC_MSG_NOTICE([Disabled threading support])
+fi
+
AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
* we use mono_os_(mutex|cond|sem)_... on MonoCoop(Mutex|Cond|Sem) structures */
typedef struct _MonoCoopMutex MonoCoopMutex;
+typedef struct _MonoCoopCond MonoCoopCond;
+
+#ifndef DISABLE_THREADS
+
struct _MonoCoopMutex {
mono_mutex_t m;
};
-typedef struct _MonoCoopCond MonoCoopCond;
struct _MonoCoopCond {
mono_cond_t c;
};
MONO_EXIT_GC_SAFE;
}
+#else /* DISABLE_THREADS */
+
+struct _MonoCoopMutex {
+ int dummy;
+};
+
+struct _MonoCoopCond {
+ int dummy;
+};
+
+static inline void
+mono_coop_mutex_init (MonoCoopMutex *mutex)
+{
+}
+
+static inline void
+mono_coop_mutex_init_recursive (MonoCoopMutex *mutex)
+{
+}
+
+static inline void
+mono_coop_mutex_destroy (MonoCoopMutex *mutex)
+{
+}
+
+static inline void
+mono_coop_mutex_lock (MonoCoopMutex *mutex)
+{
+}
+
+static inline gint
+mono_coop_mutex_trylock (MonoCoopMutex *mutex)
+{
+ return 0;
+}
+
+static inline void
+mono_coop_mutex_unlock (MonoCoopMutex *mutex)
+{
+}
+
+static inline void
+mono_coop_cond_init (MonoCoopCond *cond)
+{
+}
+
+static inline void
+mono_coop_cond_destroy (MonoCoopCond *cond)
+{
+}
+
+static inline void
+mono_coop_cond_wait (MonoCoopCond *cond, MonoCoopMutex *mutex)
+{
+}
+
+static inline gint
+mono_coop_cond_timedwait (MonoCoopCond *cond, MonoCoopMutex *mutex, guint32 timeout_ms)
+{
+ return 0;
+}
+
+static inline void
+mono_coop_cond_signal (MonoCoopCond *cond)
+{
+}
+
+static inline void
+mono_coop_cond_broadcast (MonoCoopCond *cond)
+{
+}
+
+#endif /* DISABLE_THREADS */
+
#endif /* __MONO_COOP_MUTEX_H__ */
typedef pthread_mutex_t mono_mutex_t;
typedef pthread_cond_t mono_cond_t;
+#ifndef DISABLE_THREADS
+
static inline void
mono_os_mutex_init_type (mono_mutex_t *mutex, int type)
{
g_error ("%s: pthread_mutex_unlock failed with \"%s\" (%d)", __func__, g_strerror (res), res);
}
+#else /* DISABLE_THREADS */
+
+static inline void
+mono_os_mutex_init_type (mono_mutex_t *mutex, int type)
+{
+}
+
+static inline void
+mono_os_mutex_init (mono_mutex_t *mutex)
+{
+}
+
+static inline void
+mono_os_mutex_init_recursive (mono_mutex_t *mutex)
+{
+}
+
+static inline void
+mono_os_mutex_destroy (mono_mutex_t *mutex)
+{
+}
+
+static inline void
+mono_os_mutex_lock (mono_mutex_t *mutex)
+{
+}
+
+static inline int
+mono_os_mutex_trylock (mono_mutex_t *mutex)
+{
+ return 0;
+}
+
+static inline void
+mono_os_mutex_unlock (mono_mutex_t *mutex)
+{
+}
+
+#endif /* DISABLE_THREADS */
+
static inline void
mono_os_cond_init (mono_cond_t *cond)
{