This has only one user, and currently needs an ifdef,
but will make more sense after some code motion.
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
g_assert(!err);
}
+#ifndef CONFIG_USER_ONLY
+static void tcg_region_initial_alloc(TCGContext *s)
+{
+ qemu_mutex_lock(®ion.lock);
+ tcg_region_initial_alloc__locked(s);
+ qemu_mutex_unlock(®ion.lock);
+}
+#endif
+
/* Call from a safe-work context */
void tcg_region_reset_all(void)
{
}
tcg_ctx = s;
- qemu_mutex_lock(®ion.lock);
- tcg_region_initial_alloc__locked(s);
- qemu_mutex_unlock(®ion.lock);
+ tcg_region_initial_alloc(s);
}
#endif /* !CONFIG_USER_ONLY */