Header cleanup patches for 2023-02-06
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPjQRUSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTWHwQAI5D2HTRt3peFSPg/tFuYqSGtOobzM5x
# xdZxjWCtGV+dZ4TsyQ7yJkQ2i6aPjs0LzmTnTIsmf+p1OJSthvp4fQUzfXQauiJy
# OnNA76v7WjiXB8u8tcXtEkkHNmccp8n4KMjk33TfK/HQVx7lZ2EFurlCkvBr5wki
# FuDVad6R43ChmvBWdCUOi6G1IklAihm8AN4lBJu3iC7U8bjW4FmLLMitcu5OyKgt
# v9V4XFAe4eYUIPZ6uH5Lpr5m/qtrRXLe9KOdRUR2vDVL18Cf6Zl7mrUNtv7iV5TI
# hBOA12ZP5XXf81FXl7e8y3Xi2KXvb/el0wQ7SvtE7XB3Pdbfa5WSGKOc3VxYLmBA
# 4xUnEbzAogrrruovdk1bmh2LnVzCH66m72xaLCHBvjOU3M6V2B0eeaZ35FxNuFcB
# toHPAjeuzWkDAscVYcYKuPwnkNOMNqHxEdihrgy6mYLr6nauIYr7Lqgs3SqGqpct
# /HGy683+J+AqnHFTk1MTRftDxqk/Nku6ntAxLXndkpm3uDvu+iV5d3BfK3A9t7d1
# A2Y983DU6SiVwpMIv2eDL8sXYxuwIs56ZmPYIcSbqzpCXtdFqwWOTeFET/4vD+8t
# V3YKJ27jmWQ9bxbLHGPPYSKheuCVBIGsqxouE/Pbj5nXRKm/TeGp+20a4dWdE08r
# 2WTLAQbVQGD4
# =5TPW
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 08 Feb 2023 06:28:37 GMT
# gpg: using RSA key
354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru:
Drop duplicate #include
Don't include headers already included by qemu/osdep.h
Fix non-first inclusions of qemu/osdep.h
accel: Clean up includes
block: Clean up includes
riscv: Clean up includes
target/hexagon: Clean up includes
net: Clean up includes
migration: Clean up includes
qga: Clean up includes
hw/tricore: Clean up includes
hw/input: Clean up includes
hw/cxl: Clean up includes
crypto: Clean up includes
bsd-user: Clean up includes
scripts/clean-includes: Improve --git commit message
scripts/clean-includes: Skip symbolic links
scripts/clean-includes: Don't claim duplicate headers found when not
scripts/clean-includes: Fully skip / ignore files
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
#include "exec/exec-all.h"
#include "tcg/tcg.h"
#include "qemu/atomic.h"
-#include "qemu/compiler.h"
#include "qemu/timer.h"
#include "qemu/rcu.h"
#include "exec/log.h"
* to recording, which is what guest systems expect.
*/
+#include "qemu/osdep.h"
#include <poll.h>
#include <sndio.h>
-#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "audio.h"
#include "trace.h"
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#include <sys/ioctl.h>
#include "qemu/osdep.h"
+#include <sys/ioctl.h>
#include "qom/object_interfaces.h"
#include "qapi/error.h"
#include "sysemu/hostmem.h"
#include "sysemu/runstate.h"
#include "sysemu/tpm_backend.h"
#include "sysemu/tpm_util.h"
-#include "sysemu/runstate.h"
#include "tpm_int.h"
#include "tpm_ioctl.h"
#include "migration/blocker.h"
# define __USE_LINUX_IOCTL_DEFS
#endif
-#include <stdint.h>
-#include <sys/types.h>
#ifndef _WIN32
#include <sys/uio.h>
#include <sys/ioctl.h>
* later. See the COPYING file in the top-level directory.
*/
+#include "qemu/osdep.h"
#include <sys/eventfd.h>
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "block/export.h"
#include "qemu/error-report.h"
#include "qapi/qmp/qstring.h"
#include "qemu/qemu-print.h"
#include "sysemu/block-backend.h"
-#include "qemu/cutils.h"
BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
BlockDriverState *bs,
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu/osdep.h"
#include "target_arch.h"
void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)
#ifndef BSD_PROC_H_
#define BSD_PROC_H_
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/resource.h>
-#include <unistd.h>
/* exit(2) */
static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1)
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
#include "target_arch_sysarch.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-#include <sys/time.h>
+#include "qemu/osdep.h"
#include <sys/resource.h>
#include <sys/sysctl.h>
-#include "qemu/osdep.h"
#include "qemu/help-texts.h"
#include "qemu/units.h"
#include "qemu/accel.h"
#ifndef QEMU_H
#define QEMU_H
-#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/units.h"
#include "exec/cpu_ldst.h"
#include <sys/select.h>
#include <sys/syscall.h>
#include <sys/ioccom.h>
-#include <ctype.h>
#include "qemu.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
*
*/
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/bswap.h"
#ifndef QEMU_P9ARRAY_H
#define QEMU_P9ARRAY_H
-#include "qemu/compiler.h"
-
/**
* P9Array provides a mechanism to access arrays in common C-style (e.g. by
* square bracket [] operator) in conjunction with reference variables that
#include "qemu/osdep.h"
#ifdef CONFIG_LINUX
#include <linux/limits.h>
-#else
-#include <limits.h>
#endif
#include <glib/gprintf.h>
#include "hw/virtio/virtio.h"
#include "sysemu/xen.h"
#include "qapi/error.h"
#include "qemu/range.h"
-#include "hw/acpi/pcihp.h"
#include "hw/acpi/cpu_hotplug.h"
#include "hw/acpi/cpu.h"
#include "hw/hotplug.h"
#include "net/net.h"
#include "qemu/cutils.h"
#include "qemu/datadir.h"
-#include "net/net.h"
static uint64_t cpu_alpha_superpage_to_phys(void *opaque, uint64_t addr)
{
#include "qemu/units.h"
#include "qemu/option.h"
#include "monitor/qdev.h"
-#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/boot.h"
#include "hw/arm/primecell.h"
#include "hw/misc/unimp.h"
#include "hw/arm/xlnx-versal.h"
#include "qemu/log.h"
-#include "hw/sysbus.h"
#define XLNX_VERSAL_ACPU_TYPE ARM_CPU_TYPE_NAME("cortex-a72")
#define XLNX_VERSAL_RCPU_TYPE ARM_CPU_TYPE_NAME("cortex-r5f")
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/bitops.h"
-#include "qemu/error-report.h"
#include "qemu/host-utils.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "exec/confidential-guest-support.h"
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h"
-#include "qom/object_interfaces.h"
GlobalProperty hw_compat_7_2[] = {
{ "virtio-mem", "x-early-migration", "false" },
#include "exec/ramblock.h"
#include "sysemu/hostmem.h"
#include <sys/ioctl.h>
-#include <fcntl.h>
#include <linux/memfd.h>
#include "qemu/memfd.h"
#include "standard-headers/linux/udmabuf.h"
#include "qapi/error.h"
#include "net/net.h"
#include "qemu/log.h"
-#include "net/net.h"
#define MIN_SEABIOS_HPPA_VERSION 6 /* require at least this fw version */
* See the COPYING file in the top-level directory.
*/
-#include "qemu/ctype.h"
#include "qemu/osdep.h"
+#include "qemu/ctype.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/sockets.h"
#include "qemu/osdep.h"
#include <math.h>
-#include <string.h>
#include "hw/i2c/pmbus_device.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "hw/acpi/hmat.h"
#include "hw/acpi/viot.h"
-#include "hw/acpi/cxl.h"
#include CONFIG_DEVICES
*/
#include "qemu/osdep.h"
-#include "qemu/log.h"
#include "hw/hw.h"
#include "audio/audio.h"
#include "qemu/timer.h"
/* Supported chipsets: */
#include "hw/pci-host/ls7a.h"
#include "hw/loongarch/virt.h"
-#include "hw/acpi/aml-build.h"
#include "hw/acpi/utils.h"
#include "hw/acpi/pci.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "hw/misc/macio/cuda.h"
-#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/rtc.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
#include "hw/misc/macio/pmu.h"
-#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/rtc.h"
#include "net/net.h"
#include "net/checksum.h"
-#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/stream.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "hw/intc/ppc-uic.h"
-#include "hw/qdev-properties.h"
-#include "qapi/error.h"
#include "trace.h"
/*****************************************************************************/
#include "qemu/osdep.h"
#include "qemu/units.h"
-#include "qemu/error-report.h"
#include "qemu/datadir.h"
#include "qemu/error-report.h"
#include "net/net.h"
#include "hw/ppc/spapr_drc.h"
#include "qom/object.h"
#include "migration/vmstate.h"
-#include "qapi/error.h"
#include "qapi/qapi-events-qdev.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
*/
#include "qemu/osdep.h"
-#include "qemu/cutils.h"
#include "hw/pci/pci.h"
#include "cpu.h"
#include "qemu/cutils.h"
#include "hw/remote/iohub.h"
#include "hw/remote/iommu.h"
#include "hw/qdev-core.h"
-#include "hw/remote/iommu.h"
#include "hw/remote/vfio-user-obj.h"
#include "hw/pci/msi.h"
#include "qemu/osdep.h"
-#include "qemu/compiler.h"
#include "qemu/int128.h"
#include "qemu/range.h"
#include "exec/memory.h"
#include "qemu/error-report.h"
#include "qemu/notify.h"
#include "qom/object_interfaces.h"
-#include "hw/qdev-core.h"
#include "io/channel.h"
#include "hw/qdev-core.h"
#include "hw/remote/machine.h"
#include "qapi/error.h"
#include "qapi/qapi-events-misc.h"
#include "qapi/visitor.h"
-#include "hw/rtc/mc146818rtc_regs.h"
//#define DEBUG_CMOS
//#define DEBUG_COALESCED
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-serial.h"
#include "virtio-ccw.h"
-#include "hw/virtio/virtio-serial.h"
#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw"
OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW)
*/
#include "qemu/osdep.h"
-#include <string.h>
#include "hw/i2c/pmbus_device.h"
#include "hw/irq.h"
#include "migration/vmstate.h"
*/
#include "qemu/osdep.h"
-#include "qemu/typedefs.h"
#include "qapi/error.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
*/
#include "qemu/osdep.h"
-#include "qemu/typedefs.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/usb.h"
#ifndef GRAPH_LOCK_H
#define GRAPH_LOCK_H
-#include "qemu/osdep.h"
#include "qemu/clang-tsa.h"
/**
#ifndef BLOCK_WRITE_THRESHOLD_H
#define BLOCK_WRITE_THRESHOLD_H
-#include "qemu/typedefs.h"
-
/*
* bdrv_write_threshold_set:
*
#include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h"
-#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h"
#include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h"
-#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h"
#define CXL2_COMPONENT_CM_REGION_SIZE 0x1000
#define CXL2_COMPONENT_BLOCK_SIZE 0x10000
-#include "qemu/compiler.h"
#include "qemu/range.h"
-#include "qemu/typedefs.h"
#include "hw/cxl/cxl_cdat.h"
#include "hw/register.h"
#include "qapi/error.h"
* COPYING file in the top-level directory.
*/
-#include "qemu/osdep.h"
#include "hw/cxl/cxl.h"
#include "hw/boards.h"
#ifndef CXL_PCI_H
#define CXL_PCI_H
-#include "qemu/compiler.h"
#define CXL_VENDOR_ID 0x1e98
#ifndef HW_PL050_H
#define HW_PL050_H
-#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/input/ps2.h"
#include "hw/sysbus.h"
-#include <stdint.h>
-
#define TYPE_ASPEED_LPC "aspeed.lpc"
#define ASPEED_LPC(obj) OBJECT_CHECK(AspeedLPCState, (obj), TYPE_ASPEED_LPC)
#define PCIE_DOE_H
#include "qemu/range.h"
-#include "qemu/typedefs.h"
#include "hw/register.h"
/*
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#ifndef QEMU_ASYNC_TEARDOWN_H
#define QEMU_ASYNC_TEARDOWN_H
-#include "config-host.h"
-
#ifdef CONFIG_LINUX
void init_async_teardown(void);
#endif
#include "qom/object.h"
#include "chardev/char.h"
#include "qemu/notify.h"
-#include "qemu/typedefs.h"
/* glib/gio 2.68 */
#define DBUS_METHOD_INVOCATION_HANDLED TRUE
#ifndef HOST_UTILS_H
#define HOST_UTILS_H
-#include "qemu/compiler.h"
#include "qemu/bswap.h"
#include "qemu/int128.h"
#ifdef CONFIG_LINUX
-#include "qemu/osdep.h"
#include "exec/hwaddr.h"
#include <linux/userfaultfd.h>
#ifndef ACCEL_BLOCKER_H
#define ACCEL_BLOCKER_H
-#include "qemu/osdep.h"
#include "sysemu/cpus.h"
extern void accel_blocker_init(void);
#include "qom/object.h"
#include "block/aio.h"
-#include "qemu/typedefs.h"
#define TYPE_EVENT_LOOP_BASE "event-loop-base"
OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,
*/
#include "qemu/osdep.h"
-#include "qemu/rcu.h"
#include "qemu/madvise.h"
#include "exec/target_page.h"
#include "migration.h"
#include "hw/boards.h"
#include "exec/ramblock.h"
#include "socket.h"
-#include "qemu-file.h"
#include "yank_functions.h"
#include "tls.h"
#include "qemu/userfaultfd.h"
#ifndef VMNET_INT_H
#define VMNET_INT_H
-#include "qemu/osdep.h"
#include "vmnet_int.h"
#include "clients.h"
#else
#include <net/ethernet.h>
#endif
-#include <sys/types.h>
#ifdef CONFIG_SOLARIS
#include <sys/sockio.h>
#endif
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#include "cutils.h"
+#include "qemu/osdep.h"
+#include "cutils.h"
#include "qapi/error.h"
/**
#ifndef CUTILS_H_
#define CUTILS_H_
-#include "qemu/osdep.h"
-
int qga_open_cloexec(const char *name, int flags, mode_t mode);
#endif /* CUTILS_H_ */
)
EOT
+files=
for f in "$@"; do
+ if [ -L "$f" ]; then
+ echo "SKIPPING $f (symbolic link)"
+ continue
+ fi
case "$f" in
*.c.inc)
# These aren't standalone C source files
continue
;;
esac
+ files="$files $f"
if [ "$MODE" = "c" ]; then
# First, use Coccinelle to add qemu/osdep.h before the first existing include
done
-if [ "$DUPHEAD" = "yes" ]; then
- egrep "^[[:space:]]*#[[:space:]]*include" "$@" | tr -d '[:blank:]' \
- | sort | uniq -c | awk '{if ($1 > 1) print $0}'
- if [ $? -eq 0 ]; then
+if [ "$DUPHEAD" = "yes" ] && [ -n "$files" ]; then
+ if egrep "^[[:space:]]*#[[:space:]]*include" $files | tr -d '[:blank:]' \
+ | sort | uniq -c | grep -v '^ *1 '; then
echo "Found duplicate header file includes. Please check the above files manually."
exit 1
fi
fi
if [ "$GIT" = "yes" ]; then
- git add -- "$@"
+ git add -- $files
git commit --signoff -F - <<EOF
$GITSUBJ: Clean up includes
-Clean up includes so that osdep.h is included first and headers
-which it implies are not included manually.
-
This commit was created with scripts/clean-includes.
+All .c should include qemu/osdep.h first. The script performs three
+related cleanups:
+
+* Ensure .c files include qemu/osdep.h first.
+* Including it in a .h is redundant, since the .c already includes
+ it. Drop such inclusions.
+* Likewise, including headers qemu/osdep.h includes is redundant.
+ Drop these, too.
+
EOF
fi
*/
#include "qemu/osdep.h"
-#include "qapi/error.h"
#include "qemu/main-loop.h"
#include "qapi/qapi-commands-migration.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-events-run-state.h"
#include "qemu/error-report.h"
-#include "qemu/log.h"
#include "qemu/job.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-visit-qom.h"
#include "qapi/qapi-commands-ui.h"
-#include "qapi/qmp/qdict.h"
#include "block/qdict.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/iothread.h"
#include "qemu/guest-random.h"
#include "qemu/keyval.h"
-#include "config-host.h"
-
#define MAX_VIRTIO_CONSOLES 1
typedef struct BlockdevOptionsQueueEntry {
#ifndef HEXAGON_HEX_ARCH_TYPES_H
#define HEXAGON_HEX_ARCH_TYPES_H
-#include "qemu/osdep.h"
#include "mmvec/mmvec.h"
#include "qemu/int128.h"
#ifndef HEXAGON_MMVEC_MACROS_H
#define HEXAGON_MMVEC_MACROS_H
-#include "qemu/osdep.h"
#include "qemu/host-utils.h"
#include "arch.h"
#include "mmvec/system_ext_mmvec.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
-#include "exec/translator.h"
#include "exec/log.h"
#include "qemu/qemu-print.h"
#include "fpu/softfloat.h"
#include "semihosting/semihost.h"
#include "trace.h"
-#include "exec/translator.h"
#include "exec/log.h"
#include "qemu/qemu-print.h"
#include "fpu_helper.h"
};
#endif
-#include "exec/gen-icount.h"
-
/* generate intermediate code for basic block 'tb'. */
static void nios2_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
{
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "qemu/log.h"
#include "cpu.h"
#include "qemu/main-loop.h"
#include "exec/cpu_ldst.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-ldst.h"
-#include "qemu/compiler.h"
#include <ffi.h>
*/
#include "qemu/osdep.h"
-#include "qemu/units.h"
#include "qemu/cutils.h"
#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/module.h"
-#include <unistd.h>
#include <sys/syscall.h>
static void test_seccomp_helper(const char *args, bool killed,
#include <math.h>
#include "trace.h"
-#include "qemu/cutils.h"
#include "ui/input.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "ui/console.h"
-#include <fcntl.h>
#include <sys/ioctl.h>
int udmabuf_fd(void)
* option) any later version. See the COPYING file in the top-level directory.
*
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
+
+#include "qemu/osdep.h"
#include <dirent.h>
#include <sys/prctl.h>
-#include <signal.h>
#include <sched.h>
-#include <unistd.h>
-#include "qemu/osdep.h"
#include "qemu/async-teardown.h"
#ifdef _SC_THREAD_STACK_MIN
#include "block/thread-pool.h"
#include "qemu/error-report.h"
#include "qemu/queue.h"
-#include "qemu/compiler.h"
#include "qom/object.h"
#ifndef _WIN32
#include "qemu/thread.h"
#include <libgen.h>
#include "qemu/cutils.h"
-#include "qemu/compiler.h"
#include "qemu/units.h"
#include "qemu/thread-context.h"
#ifdef __FreeBSD__
#include <sys/thr.h>
-#include <sys/types.h>
#include <sys/user.h>
#include <libutil.h>
#endif
#include "qemu/mmap-alloc.h"
-#ifdef CONFIG_DEBUG_STACK_USAGE
-#include "qemu/error-report.h"
-#endif
-
#define MAX_MEM_PREALLOC_THREAD_COUNT 16
struct MemsetThread;