From nobody Wed May 15 03:56:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1658153009; cv=none; d=zohomail.com; s=zohoarc; b=Hpp5K7CTMRE08FDaP8yDk+s1cPGvpvXo95RlvJNFFTEH+eGNQLHjuXet2/1F4o28aQRLSAOwE5XMa/E2zlYPXEaB65lcbZ7SXzbSbxkmdfOdgU42OBXT3Pr8esQ5baD6n/vEQCgxaEVDVkW4+0znoxUi0mP/5lfJrFmOzInb4lY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658153009; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LwP0Qa4HgkLfbJd/0cqsHHlS05tSsldOKAwRTV5+ZOU=; b=YtAoelx9Xr6bmkW1CbrcQft7eCadylA35d30QOV3DfUa6Vx1wNBKEN/o9953FM/8ALYthPRuEqZK4tBrEk9W0fb/o6dOQeXFOTjLJE2T8ntW0jtb/P44ylKLAq2fw0Nz9QNZp2kC/wTuW5Y1tnp2lu84bN7nPR0ge2PHekiofJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 165815300964212.652015796221463; Mon, 18 Jul 2022 07:03:29 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-9RbAJRJhPP6wy9RGbz81AQ-1; Mon, 18 Jul 2022 10:03:25 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5EEC48115B1; Mon, 18 Jul 2022 14:03:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 476BC492C3B; Mon, 18 Jul 2022 14:03:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 19EA91947070; Mon, 18 Jul 2022 14:03:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C7DAD19252A1 for ; Mon, 18 Jul 2022 14:03:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A2D0E403163; Mon, 18 Jul 2022 14:03:18 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4109C401E92 for ; Mon, 18 Jul 2022 14:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658153008; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LwP0Qa4HgkLfbJd/0cqsHHlS05tSsldOKAwRTV5+ZOU=; b=FKEHJHivzLWeaA8ZB6XB3UbYT/hdLQH7rgdfoE7RrtkL991hf+iTVx8sz3MzIC80BrDxLa Txu/vXG/f2xcPLrXkQG9JT8TUJxkP/KPEI8FiCAlMRnBjX0e62vsi1Bg0Ats+MYUfMo1nP bEpCx3dzNO7ZZWTmLiR0vZYfp2/vaYI= X-MC-Unique: 9RbAJRJhPP6wy9RGbz81AQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] glibcompat: Provide implementation for G_GNUC_NO_INLINE Date: Mon, 18 Jul 2022 16:03:15 +0200 Message-Id: <66b3023d43f9af5a239c84e3ca3ff93fd09a9508.1658152911.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658153010732100005 Content-Type: text/plain; charset="utf-8"; x-default="true" Currently, we require glib-2.56.0 at minimum (because of RHEL-8) but we use G_GNUC_NO_INLINE which was introduced in 2.58.0. While we provide an implementation for older versions, where the macro does not exists, it's a bit more tricky than that. Since we define GLIB_VERSION_MAX_ALLOWED we would get a compile time error when trying to use something too new, except for G_GNUC_NO_INLINE which was intentionally not marked as GLIB_AVAILABLE_MACRO_IN_2_58. But this is about to change with glib-2.73.2 (which contains commit [1]). At the same time, we can't just bump glib and thus we have to provide an alternative implementation without the version annotation. 1: https://gitlab.gnome.org/GNOME/glib/-/commit/a6f8fe071e44b0145619c21f3bf= bc90c56ab805e Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- src/internal.h | 12 ------------ src/util/glibcompat.h | 9 +++++++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/internal.h b/src/internal.h index 4cfb022b41..1e8e2908bf 100644 --- a/src/internal.h +++ b/src/internal.h @@ -109,18 +109,6 @@ # endif #endif =20 -/** - * G_GNUC_NO_INLINE: - * - * Force compiler not to inline a method. Should be used if - * the method need to be overridable by test mocks. - * - * TODO: Remove after upgrading to GLib >=3D 2.58 - */ -#ifndef G_GNUC_NO_INLINE -# define G_GNUC_NO_INLINE __attribute__((__noinline__)) -#endif - /** * ATTRIBUTE_PACKED * diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h index 1f3a6f728f..e3a8b9f6b3 100644 --- a/src/util/glibcompat.h +++ b/src/util/glibcompat.h @@ -94,3 +94,12 @@ char *vir_g_strdup_vprintf(const char *msg, va_list args) #define g_fsync vir_g_fsync =20 void vir_g_source_unref(GSource *src, GMainContext *ctx); + +/* Intentionally redefine macro so that it's not marked as available in 2.= 58 + * and newer. Drop when bumping to 2.58 or newer. */ +#undef G_GNUC_NO_INLINE +#if g_macro__has_attribute(__noinline__) +# define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) +#else +# define G_GNUC_NO_INLINE +#endif --=20 2.35.1 From nobody Wed May 15 03:56:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1658153007; cv=none; d=zohomail.com; s=zohoarc; b=e8xV46zejmxKOam6DquqaMnAqlyWnY2ZzksgL/XfQ7N7/ZvGFMETMQe8yQo9hOy+EikVfmY/yIHA+K3Zi6dfGnrWn1DQ9QkCivcY1NwiErdP0MHfGsQDyTb0LutIDkFU4Jx03weAfj0aRVtt0fQnhaXT88zZfVJkoG4quMy3yQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658153007; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xHC/JEe0L5+ZeBhCnCz9osbxzWtgIf2kWkiCFvZjLyA=; b=mCeVqtNtgZvM8HysSUq9fbOXdBSdjv0FCpHONziarJDUhHeZxrlFpoHFfBLUqmetw2Qe2J8alKZjVBYDGlKAX74EzJFWkMfyHY0EF/+CY60ZEWkzMXSYmdr72VP6g+eDlinJlGqt1rEXo7qopp8ag33zYhrQ58JpH4kGKYSRN4A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 165815300795710.397944710223442; Mon, 18 Jul 2022 07:03:27 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-H4C5CeXTPEWfh6eC93zweg-1; Mon, 18 Jul 2022 10:03:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CF392999B39; Mon, 18 Jul 2022 14:03:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10C9F2026D2D; Mon, 18 Jul 2022 14:03:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EDAC51947070; Mon, 18 Jul 2022 14:03:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9A4E01945DA7 for ; Mon, 18 Jul 2022 14:03:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7057C401E7B; Mon, 18 Jul 2022 14:03:19 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8AF5401473 for ; Mon, 18 Jul 2022 14:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658153006; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xHC/JEe0L5+ZeBhCnCz9osbxzWtgIf2kWkiCFvZjLyA=; b=DIiGdXG1QxyJJm6fzFsq+xmEVk5WjpU8/F1O0UG/bq6DW+y2SO7/HUGoZ9fEwEdhZQ2s7c O6lWH0m2HyRZGG1NPJu6rr0Be9utNnGAM2s7EFrlrF0uj8AHvy/v6Bmlwj1Z2fhq/mEMMK 65nNl3yDTIMT5avbMuwMUEcvEO4GP3M= X-MC-Unique: H4C5CeXTPEWfh6eC93zweg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/2] lib: Use G_NO_INLINE instead of G_GNUC_NO_INLINE Date: Mon, 18 Jul 2022 16:03:16 +0200 Message-Id: <91d5eff2c780f8bb96315047638e7b7aee1a40d5.1658152911.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658153008741100002 Content-Type: text/plain; charset="utf-8"; x-default="true" The G_GNUC_NO_INLINE macro will eventually be marked as deprecated [1] and we are recommended to use G_NO_INLINE instead. Do the switch now, rather than waiting for compile time warning to occur. 1: https://gitlab.gnome.org/GNOME/glib/-/commit/15cd0f04612c90292792c4d123e= be84bf4bf93a6 Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- docs/coding-style.rst | 2 +- scripts/cocci-macro-file.h | 2 +- scripts/mock-noinline.py | 4 ++-- src/cpu/cpu.h | 2 +- src/libxl/libxl_capabilities.h | 2 +- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_capspriv.h | 2 +- src/qemu/qemu_command.h | 4 ++-- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_hotplug.h | 2 +- src/qemu/qemu_interface.h | 4 ++-- src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.h | 2 +- src/qemu/qemu_monitor_priv.h | 2 +- src/qemu/qemu_process.h | 6 +++--- src/rpc/virnetsocket.h | 4 ++-- src/util/glibcompat.h | 28 ++++++++++++++++++++-------- src/util/vircgroupv2devices.h | 2 +- src/util/vircommand.h | 2 +- src/util/virdevmapper.h | 2 +- src/util/virfile.h | 18 +++++++++--------- src/util/virhashcode.h | 2 +- src/util/virhostcpu.h | 6 +++--- src/util/virhostmem.h | 2 +- src/util/virhostuptime.h | 2 +- src/util/viridentitypriv.h | 2 +- src/util/virmacaddr.h | 2 +- src/util/virnetdev.h | 10 +++++----- src/util/virnetdevbandwidth.h | 2 +- src/util/virnetdevip.h | 2 +- src/util/virnetdevmacvlan.h | 2 +- src/util/virnetdevopenvswitch.h | 2 +- src/util/virnetdevtap.h | 6 +++--- src/util/virnuma.h | 18 +++++++++--------- src/util/virprocess.h | 6 +++--- src/util/virrandom.h | 6 +++--- src/util/virscsi.h | 2 +- src/util/virscsivhost.h | 2 +- src/util/virtpm.h | 2 +- src/util/virutil.h | 16 ++++++++-------- src/util/viruuid.h | 4 ++-- 41 files changed, 102 insertions(+), 90 deletions(-) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index cb23751721..bf0a80fbc5 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -628,7 +628,7 @@ analysis tools understand the code better: ``G_GNUC_FALLTHROUGH`` allow code reuse by multiple switch cases =20 -``G_GNUC_NO_INLINE`` +``G_NO_INLINE`` the function is mocked in the test suite =20 ``G_GNUC_NORETURN`` diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index 4e6d218a97..c3112663d1 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -28,7 +28,7 @@ #define G_GNUC_UNUSED #define G_GNUC_NULL_TERMINATED #define G_GNUC_NORETURN -#define G_GNUC_NO_INLINE +#define G_NO_INLINE #define G_GNUC_FALLTHROUGH #define G_GNUC_PRINTF(a, b) =20 diff --git a/scripts/mock-noinline.py b/scripts/mock-noinline.py index 13c296603d..ec617bbc2b 100644 --- a/scripts/mock-noinline.py +++ b/scripts/mock-noinline.py @@ -43,7 +43,7 @@ def scan_annotations(filename): elif line.isspace(): func =3D None =20 - if "G_GNUC_NO_INLINE" in line: + if "G_NO_INLINE" in line: if func is not None: noninlined[func] =3D True =20 @@ -73,7 +73,7 @@ warned =3D False for func in mocked.keys(): if func not in noninlined: warned =3D True - print("%s is mocked at %s but missing 'G_GNUC_NO_INLINE' annotatio= n" % + print("%s is mocked at %s but missing 'G_NO_INLINE' annotation" % (func, mocked[func]), file=3Dsys.stderr) =20 if warned: diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 06b5858ef3..41a62ce486 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -212,7 +212,7 @@ virCPUGetHost(virArch arch, virDomainCapsCPUModels *models); =20 virCPUDef * -virCPUProbeHost(virArch arch) G_GNUC_NO_INLINE; +virCPUProbeHost(virArch arch) G_NO_INLINE; =20 virCPUDef * virCPUBaseline(virArch arch, diff --git a/src/libxl/libxl_capabilities.h b/src/libxl/libxl_capabilities.h index 6611786dd5..fd6332b63e 100644 --- a/src/libxl/libxl_capabilities.h +++ b/src/libxl/libxl_capabilities.h @@ -47,4 +47,4 @@ libxlMakeDomainCapabilities(virDomainCaps *domCaps, =20 int libxlDomainGetEmulatorType(const virDomainDef *def) - G_GNUC_NO_INLINE; + G_NO_INLINE; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 67769fcfe4..d979a5ba3b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -845,7 +845,7 @@ virSEVCapability * virQEMUCapsGetSEVCapabilities(virQEMUCaps *qemuCaps); =20 bool -virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) G_GNUC_NO_INLI= NE; +virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) G_NO_INLINE; =20 virArch virQEMUCapsArchFromString(const char *arch); const char *virQEMUCapsArchToString(virArch arch); diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index fe24d01342..87368536ea 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -85,7 +85,7 @@ virQEMUCapsGetCPUModelX86Data(virQEMUCaps *qemuCaps, =20 virCPUDef * virQEMUCapsProbeHostCPU(virArch hostArch, - virDomainCapsCPUModels *models) G_GNUC_NO_INLINE; + virDomainCapsCPUModels *models) G_NO_INLINE; =20 void virQEMUCapsSetGICCapabilities(virQEMUCaps *qemuCaps, diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index f8e9d71e81..6d2adcfc16 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -67,7 +67,7 @@ int qemuBuildTLSx509BackendProps(const char *tlspath, =20 /* Open a UNIX socket for chardev FD passing */ int -qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_GNUC_NO_I= NLINE; +qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_NO_INLINE; =20 virJSONValue * qemuBuildChrDeviceProps(const virDomainDef *vmdef, @@ -238,7 +238,7 @@ int qemuBuildTPMOpenBackendFDs(const char *tpmdev, int *tpmfd, int *cancelfd) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_= NO_INLINE; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_NO_IN= LINE; =20 const char * qemuAudioDriverTypeToString(virDomainAudioType type); virDomainAudioType qemuAudioDriverTypeFromString(const char *str); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 27e68370cf..6bc160de4a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5281,7 +5281,7 @@ qemuDomainResetDeviceRemoval(virDomainObj *vm) } =20 =20 -unsigned long long G_GNUC_NO_INLINE +unsigned long long G_NO_INLINE qemuDomainGetUnplugTimeout(virDomainObj *vm) { if (qemuDomainIsPSeries(vm->def)) diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h index 2b1e8085a4..f769bf6477 100644 --- a/src/qemu/qemu_hotplug.h +++ b/src/qemu/qemu_hotplug.h @@ -159,7 +159,7 @@ int qemuDomainSetVcpuInternal(virQEMUDriver *driver, virBitmap *vcpus, bool state); =20 -unsigned long long qemuDomainGetUnplugTimeout(virDomainObj *vm) G_GNUC_NO_= INLINE; +unsigned long long qemuDomainGetUnplugTimeout(virDomainObj *vm) G_NO_INLIN= E; =20 int qemuHotplugAttachDBusVMState(virQEMUDriver *driver, virDomainObj *vm, diff --git a/src/qemu/qemu_interface.h b/src/qemu/qemu_interface.h index d7ac6e6fc9..d866beb184 100644 --- a/src/qemu/qemu_interface.h +++ b/src/qemu/qemu_interface.h @@ -51,9 +51,9 @@ int qemuInterfaceBridgeConnect(virDomainDef *def, ATTRIBUTE_NONNULL(2); =20 int qemuInterfaceOpenVhostNet(virDomainObj *def, - virDomainNetDef *net) G_GNUC_NO_INLINE; + virDomainNetDef *net) G_NO_INLINE; =20 int qemuInterfacePrepareSlirp(virQEMUDriver *driver, virDomainNetDef *net); =20 -int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_GNUC_NO_INLINE; +int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_NO_INLINE; diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index f7e01f71fe..cc1a0bc8c9 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -435,7 +435,7 @@ int qemuMonitorSetLink(qemuMonitor *mon, /* These APIs are for use by the internal Text/JSON monitor impl code only= */ char *qemuMonitorNextCommandID(qemuMonitor *mon); int qemuMonitorSend(qemuMonitor *mon, - qemuMonitorMessage *msg) G_GNUC_NO_INLINE; + qemuMonitorMessage *msg) G_NO_INLINE; int qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, virDomainVideoDef *video, const char *videoName) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 7006aa8c46..2759566892 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -31,7 +31,7 @@ int qemuMonitorJSONIOProcessLine(qemuMonitor *mon, const char *line, qemuMonitorMessage *msg) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int qemuMonitorJSONIOProcess(qemuMonitor *mon, diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h index 05ac5499bb..2f7c662cef 100644 --- a/src/qemu/qemu_monitor_priv.h +++ b/src/qemu/qemu_monitor_priv.h @@ -101,4 +101,4 @@ qemuMonitorIOWriteWithFD(qemuMonitor *mon, const char *data, size_t len, int fd) - G_GNUC_NO_INLINE; + G_NO_INLINE; diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 0fddae0bbb..55296e54e8 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -117,7 +117,7 @@ int qemuProcessPrepareHostHostdev(virDomainHostdevDef *= hostdev); =20 int qemuProcessPrepareHostBackendChardevHotplug(virDomainObj *vm, virDomainDeviceDef *dev) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 =20 int qemuProcessPrepareHost(virQEMUDriver *driver, @@ -205,9 +205,9 @@ int qemuProcessRefreshDisks(virQEMUDriver *driver, virDomainObj *vm, virDomainAsyncJob asyncJob); =20 -int qemuProcessStartManagedPRDaemon(virDomainObj *vm) G_GNUC_NO_INLINE; +int qemuProcessStartManagedPRDaemon(virDomainObj *vm) G_NO_INLINE; =20 -void qemuProcessKillManagedPRDaemon(virDomainObj *vm) G_GNUC_NO_INLINE; +void qemuProcessKillManagedPRDaemon(virDomainObj *vm) G_NO_INLINE; =20 typedef struct _qemuProcessQMP qemuProcessQMP; struct _qemuProcessQMP { diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h index 6fef8d30b3..fec84ca068 100644 --- a/src/rpc/virnetsocket.h +++ b/src/rpc/virnetsocket.h @@ -132,10 +132,10 @@ int virNetSocketGetUNIXIdentity(virNetSocket *sock, gid_t *gid, pid_t *pid, unsigned long long *timestamp) - G_GNUC_NO_INLINE; + G_NO_INLINE; int virNetSocketGetSELinuxContext(virNetSocket *sock, char **context) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virNetSocketSetBlocking(virNetSocket *sock, bool blocking); diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h index e3a8b9f6b3..02f8ec090c 100644 --- a/src/util/glibcompat.h +++ b/src/util/glibcompat.h @@ -95,11 +95,23 @@ char *vir_g_strdup_vprintf(const char *msg, va_list arg= s) =20 void vir_g_source_unref(GSource *src, GMainContext *ctx); =20 -/* Intentionally redefine macro so that it's not marked as available in 2.= 58 - * and newer. Drop when bumping to 2.58 or newer. */ -#undef G_GNUC_NO_INLINE -#if g_macro__has_attribute(__noinline__) -# define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) -#else -# define G_GNUC_NO_INLINE -#endif +#if !GLIB_CHECK_VERSION(2, 73, 0) +# if (defined(__has_attribute) && __has_attribute(__noinline__)) || G_GNUC= _CHECK_VERSION (2, 96) +# if defined (__cplusplus) && __cplusplus >=3D 201103L + /* Use ISO C++11 syntax when the compiler supports it. */ +# define G_NO_INLINE [[gnu::noinline]] +# else +# define G_NO_INLINE __attribute__ ((__noinline__)) +# endif +# elif defined (_MSC_VER) && (1200 <=3D _MSC_VER) + /* Use MSVC specific syntax. */ +# if defined (__cplusplus) && __cplusplus >=3D 201103L + /* Use ISO C++11 syntax when the compiler supports it. */ +# define G_NO_INLINE [[msvc::noinline]] +# else +# define G_NO_INLINE __declspec (noinline) +# endif +# else +# define G_NO_INLINE /* empty */ +# endif +#endif /* GLIB_CHECK_VERSION(2, 73, 0) */ diff --git a/src/util/vircgroupv2devices.h b/src/util/vircgroupv2devices.h index 1ff46987e8..d2d769ba5a 100644 --- a/src/util/vircgroupv2devices.h +++ b/src/util/vircgroupv2devices.h @@ -26,7 +26,7 @@ =20 bool virCgroupV2DevicesAvailable(virCgroup *group) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virCgroupV2DevicesDetectProg(virCgroup *group); diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 21ef8ff663..c7a580e152 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -54,7 +54,7 @@ typedef enum { =20 void virCommandPassFD(virCommand *cmd, int fd, - unsigned int flags) G_GNUC_NO_INLINE; + unsigned int flags) G_NO_INLINE; =20 void virCommandSetPidFile(virCommand *cmd, const char *pidfile) ATTRIBUTE_NONNULL(2); diff --git a/src/util/virdevmapper.h b/src/util/virdevmapper.h index 4d8d3ccdb8..6972050bc5 100644 --- a/src/util/virdevmapper.h +++ b/src/util/virdevmapper.h @@ -24,7 +24,7 @@ =20 int virDevMapperGetTargets(const char *path, - GSList **devPaths) G_GNUC_NO_INLINE; + GSList **devPaths) G_NO_INLINE; =20 bool virIsDevMapperDevice(const char *dev_name) ATTRIBUTE_NONNULL(1); diff --git a/src/util/virfile.h b/src/util/virfile.h index 8e378efe30..4af1ad9136 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -119,9 +119,9 @@ int virFileWrapperFdClose(virFileWrapperFd *dfd); void virFileWrapperFdFree(virFileWrapperFd *dfd); =20 int virFileLock(int fd, bool shared, off_t start, off_t len, bool waitForL= ock) - G_GNUC_NO_INLINE; + G_NO_INLINE; int virFileUnlock(int fd, off_t start, off_t len) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 typedef int (*virFileRewriteFunc)(int fd, const char *path, @@ -188,7 +188,7 @@ int virFileIsLink(const char *linkpath) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; =20 char *virFindFileInPath(const char *file) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 char *virFileFindResource(const char *filename, const char *builddir, @@ -207,7 +207,7 @@ void virFileActivateDirOverrideForLib(void); =20 off_t virFileLength(const char *path, int fd) ATTRIBUTE_NONNULL(1); bool virFileIsDir (const char *file) ATTRIBUTE_NONNULL(1); -bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_GNUC_NO_INLINE; +bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_NO_INLINE; bool virFileIsExecutable(const char *file) ATTRIBUTE_NONNULL(1); bool virFileIsRegular(const char *file) ATTRIBUTE_NONNULL(1); =20 @@ -241,7 +241,7 @@ int virFileGetMountReverseSubtree(const char *mtabpath, size_t *nmountsret) G_GNUC_WARN_UNUSED_R= ESULT; =20 char *virFileSanitizePath(const char *path); -char *virFileCanonicalizePath(const char *path) G_GNUC_NO_INLINE; +char *virFileCanonicalizePath(const char *path) G_NO_INLINE; =20 enum { VIR_FILE_OPEN_NONE =3D 0, @@ -363,21 +363,21 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFileWrapperFd, virFi= leWrapperFdFree); int virFileGetXAttr(const char *path, const char *name, char **value) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virFileGetXAttrQuiet(const char *path, const char *name, char **value) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virFileSetXAttr(const char *path, const char *name, const char *value) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virFileRemoveXAttr(const char *path, const char *name) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virFileDataSync(int fd); =20 diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h index 10d8451795..5c68e5a89a 100644 --- a/src/util/virhashcode.h +++ b/src/util/virhashcode.h @@ -30,4 +30,4 @@ #include "internal.h" =20 uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed) - G_GNUC_NO_INLINE; + G_NO_INLINE; diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h index 86a231daa2..b8ea7aafad 100644 --- a/src/util/virhostcpu.h +++ b/src/util/virhostcpu.h @@ -45,7 +45,7 @@ virBitmap *virHostCPUGetOnlineBitmap(void); virBitmap *virHostCPUGetAvailableCPUsBitmap(void); =20 int virHostCPUGetCount(void); -int virHostCPUGetThreadsPerSubcore(virArch arch) G_GNUC_NO_INLINE; +int virHostCPUGetThreadsPerSubcore(virArch arch) G_NO_INLINE; =20 int virHostCPUGetMap(unsigned char **cpumap, unsigned int *online, @@ -58,7 +58,7 @@ int virHostCPUGetInfo(virArch hostarch, unsigned int *cores, unsigned int *threads); =20 -int virHostCPUGetKVMMaxVCPUs(void) G_GNUC_NO_INLINE; +int virHostCPUGetKVMMaxVCPUs(void) G_NO_INLINE; =20 int virHostCPUStatsAssign(virNodeCPUStatsPtr param, const char *name, @@ -75,7 +75,7 @@ virBitmap *virHostCPUGetSiblingsList(unsigned int cpu); int virHostCPUGetOnline(unsigned int cpu, bool *online); =20 unsigned int -virHostCPUGetMicrocodeVersion(virArch hostArch) G_GNUC_NO_INLINE; +virHostCPUGetMicrocodeVersion(virArch hostArch) G_NO_INLINE; =20 int virHostCPUGetMSR(unsigned long index, uint64_t *msr); diff --git a/src/util/virhostmem.h b/src/util/virhostmem.h index c36de94f0f..79e1a300a8 100644 --- a/src/util/virhostmem.h +++ b/src/util/virhostmem.h @@ -57,4 +57,4 @@ int virHostMemAllocPages(unsigned int npages, bool add); =20 int virHostMemGetTHPSize(unsigned long long *size) - G_GNUC_NO_INLINE; + G_NO_INLINE; diff --git a/src/util/virhostuptime.h b/src/util/virhostuptime.h index 1ac638fd6e..44a91b5b52 100644 --- a/src/util/virhostuptime.h +++ b/src/util/virhostuptime.h @@ -24,7 +24,7 @@ =20 int virHostGetBootTime(unsigned long long *when) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virHostBootTimeInit(void); diff --git a/src/util/viridentitypriv.h b/src/util/viridentitypriv.h index e5ca8430f8..63357d891a 100644 --- a/src/util/viridentitypriv.h +++ b/src/util/viridentitypriv.h @@ -27,4 +27,4 @@ #include "viridentity.h" =20 char * -virIdentityEnsureSystemToken(void) G_GNUC_NO_INLINE; +virIdentityEnsureSystemToken(void) G_NO_INLINE; diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h index 1a46565fe6..f32b58805a 100644 --- a/src/util/virmacaddr.h +++ b/src/util/virmacaddr.h @@ -49,7 +49,7 @@ void virMacAddrGetRaw(const virMacAddr *src, unsigned cha= r dst[VIR_MAC_BUFLEN]); const char *virMacAddrFormat(const virMacAddr *addr, char *str); void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN], - virMacAddr *addr) G_GNUC_NO_INLINE; + virMacAddr *addr) G_NO_INLINE; int virMacAddrParse(const char* str, virMacAddr *addr) G_GNUC_WARN_UNUSED_RESULT; int virMacAddrParseHex(const char* str, diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 790fae5f7a..05daed09e9 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -168,11 +168,11 @@ int virNetDevSetupControl(const char *ifname, G_GNUC_WARN_UNUSED_RESULT; =20 int virNetDevExists(const char *brname) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevSetOnline(const char *ifname, bool online) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; int virNetDevGetOnline(const char *ifname, bool *online) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; @@ -180,7 +180,7 @@ int virNetDevGetOnline(const char *ifname, =20 int virNetDevSetMAC(const char *ifname, const virMacAddr *macaddr) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= NO_INLINE; int virNetDevGetMAC(const char *ifname, virMacAddr *macaddr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; @@ -324,10 +324,10 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link, const char *ifname, const char *file) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) - G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevRunEthernetScript(const char *ifname, const char *script) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virNetDevVFInterfaceStats(virPCIDeviceAddress *vfAddr, virDomainInterfaceStatsPtr stats) diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index c82029fc0f..6d268fb119 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -77,4 +77,4 @@ int virNetDevBandwidthUpdateFilter(const char *ifname, =20 int virNetDevBandwidthSetRootQDisc(const char *ifname, const char *qdisc) - G_GNUC_NO_INLINE; + G_NO_INLINE; diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h index 136048090d..fdf116f509 100644 --- a/src/util/virnetdevip.h +++ b/src/util/virnetdevip.h @@ -59,7 +59,7 @@ int virNetDevIPAddrAdd(const char *ifname, virSocketAddr *addr, virSocketAddr *peer, unsigned int prefix) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= NO_INLINE; int virNetDevIPRouteAdd(const char *ifname, virSocketAddr *addr, unsigned int prefix, diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index 405e48088f..29bb8123f4 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -47,7 +47,7 @@ typedef enum { } virNetDevMacVLanCreateFlags; =20 bool virNetDevMacVLanIsMacvtap(const char *ifname) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevMacVLanCreate(const char *ifname, const virMacAddr *macaddress, diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitc= h.h index b16c8fe318..e6ee985f17 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -65,7 +65,7 @@ virNetDevOpenvswitchMaybeUnescapeReply(char *reply) int virNetDevOpenvswitchGetVhostuserIfname(const char *path, bool server, char **ifname) - ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevOpenvswitchUpdateVlan(const char *ifname, const virNetDevVlan *virtVlan) diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h index 922682adae..197ea10f94 100644 --- a/src/util/virnetdevtap.h +++ b/src/util/virnetdevtap.h @@ -34,7 +34,7 @@ int virNetDevTapCreate(char **ifname, int *tapfd, size_t tapfdSize, unsigned int flags) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevTapDelete(const char *ifname, const char *tunpath) @@ -44,7 +44,7 @@ int virNetDevTapGetName(int tapfd, char **ifname) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; =20 char* virNetDevTapGetRealDeviceName(char *ifname) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 typedef enum { VIR_NETDEV_TAP_CREATE_NONE =3D 0, @@ -99,7 +99,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, unsigned int *actualMTU, unsigned int flags) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) - G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; + G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; =20 int virNetDevTapInterfaceStats(const char *ifname, virDomainInterfaceStatsPtr stats, diff --git a/src/util/virnuma.h b/src/util/virnuma.h index bc79bff891..c35acd47cb 100644 --- a/src/util/virnuma.h +++ b/src/util/virnuma.h @@ -32,20 +32,20 @@ int virNumaSetupMemoryPolicy(virDomainNumatuneMemMode m= ode, virBitmap *nodeset); =20 virBitmap *virNumaGetHostMemoryNodeset(void); -bool virNumaNodesetIsAvailable(virBitmap *nodeset) G_GNUC_NO_INLINE; -bool virNumaIsAvailable(void) G_GNUC_NO_INLINE; -int virNumaGetMaxNode(void) G_GNUC_NO_INLINE; -bool virNumaNodeIsAvailable(int node) G_GNUC_NO_INLINE; +bool virNumaNodesetIsAvailable(virBitmap *nodeset) G_NO_INLINE; +bool virNumaIsAvailable(void) G_NO_INLINE; +int virNumaGetMaxNode(void) G_NO_INLINE; +bool virNumaNodeIsAvailable(int node) G_NO_INLINE; int virNumaGetDistances(int node, int **distances, - int *ndistances) G_GNUC_NO_INLINE; + int *ndistances) G_NO_INLINE; int virNumaGetNodeMemory(int node, unsigned long long *memsize, - unsigned long long *memfree) G_GNUC_NO_INLINE; + unsigned long long *memfree) G_NO_INLINE; =20 -unsigned int virNumaGetMaxCPUs(void) G_GNUC_NO_INLINE; +unsigned int virNumaGetMaxCPUs(void) G_NO_INLINE; =20 -int virNumaGetNodeCPUs(int node, virBitmap **cpus) G_GNUC_NO_INLINE; +int virNumaGetNodeCPUs(int node, virBitmap **cpus) G_NO_INLINE; int virNumaNodesetToCPUset(virBitmap *nodeset, virBitmap **cpuset); =20 @@ -59,7 +59,7 @@ int virNumaGetPages(int node, unsigned long long **pages_avail, unsigned long long **pages_free, size_t *npages) - ATTRIBUTE_NONNULL(5) G_GNUC_NO_INLINE; + ATTRIBUTE_NONNULL(5) G_NO_INLINE; int virNumaSetPagePoolSize(int node, unsigned int page_size, unsigned long long page_count, diff --git a/src/util/virprocess.h b/src/util/virprocess.h index 086fbe0e4d..30b6981c73 100644 --- a/src/util/virprocess.h +++ b/src/util/virprocess.h @@ -77,12 +77,12 @@ int virProcessGetNamespaces(pid_t pid, int virProcessSetNamespaces(size_t nfdlist, int *fdlist); =20 -int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_GNUC_NO= _INLINE; +int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_NO_INLI= NE; int virProcessSetMaxProcesses(pid_t pid, unsigned int procs); int virProcessSetMaxFiles(pid_t pid, unsigned int files); int virProcessSetMaxCoreSize(pid_t pid, unsigned long long bytes); =20 -int virProcessGetMaxMemLock(pid_t pid, unsigned long long *bytes) G_GNUC_N= O_INLINE; +int virProcessGetMaxMemLock(pid_t pid, unsigned long long *bytes) G_NO_INL= INE; =20 /* Callback to run code within the mount namespace tied to the given * pid. This function must use only async-signal-safe functions, as @@ -110,7 +110,7 @@ typedef int (*virProcessForkCallback)(pid_t ppid, =20 int virProcessRunInFork(virProcessForkCallback cb, void *opaque) - G_GNUC_NO_INLINE; + G_NO_INLINE; =20 int virProcessSetupPrivateMountNS(void); =20 diff --git a/src/util/virrandom.h b/src/util/virrandom.h index aac684ada9..8a20401954 100644 --- a/src/util/virrandom.h +++ b/src/util/virrandom.h @@ -20,10 +20,10 @@ =20 #include "internal.h" =20 -uint64_t virRandomBits(int nbits) G_GNUC_NO_INLINE; +uint64_t virRandomBits(int nbits) G_NO_INLINE; double virRandom(void); uint32_t virRandomInt(uint32_t max); int virRandomBytes(unsigned char *buf, size_t buflen) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; -int virRandomGenerateWWN(char **wwn, const char *virt_type) G_GNUC_NO_INLI= NE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; +int virRandomGenerateWWN(char **wwn, const char *virt_type) G_NO_INLINE; char *virRandomToken(size_t len); diff --git a/src/util/virscsi.h b/src/util/virscsi.h index 65ad15ed76..ec34303bdc 100644 --- a/src/util/virscsi.h +++ b/src/util/virscsi.h @@ -34,7 +34,7 @@ char *virSCSIDeviceGetSgName(const char *sysfs_prefix, const char *adapter, unsigned int bus, unsigned int target, - unsigned long long unit) G_GNUC_NO_INLINE; + unsigned long long unit) G_NO_INLINE; char *virSCSIDeviceGetDevName(const char *sysfs_prefix, const char *adapter, unsigned int bus, diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h index d030aea397..a7299382db 100644 --- a/src/util/virscsivhost.h +++ b/src/util/virscsivhost.h @@ -57,6 +57,6 @@ void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevice *dev, const char **drv_name, const char **dom_name); void virSCSIVHostDeviceFree(virSCSIVHostDevice *dev); -int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_GNUC_NO_INLINE; +int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_NO_INLINE; =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree); diff --git a/src/util/virtpm.h b/src/util/virtpm.h index bbf379a54a..89adbdf720 100644 --- a/src/util/virtpm.h +++ b/src/util/virtpm.h @@ -20,7 +20,7 @@ =20 #pragma once =20 -char *virTPMCreateCancelPath(const char *devpath) G_GNUC_NO_INLINE; +char *virTPMCreateCancelPath(const char *devpath) G_NO_INLINE; =20 char *virTPMGetSwtpm(void); char *virTPMGetSwtpmSetup(void); diff --git a/src/util/virutil.h b/src/util/virutil.h index 6adebde242..ab8511bf8d 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -89,17 +89,17 @@ static inline int pthread_sigmask(int how, } #endif =20 -char *virGetHostname(void) G_GNUC_NO_INLINE; +char *virGetHostname(void) G_NO_INLINE; char *virGetHostnameQuiet(void); =20 char *virGetUserDirectory(void); char *virGetUserDirectoryByUID(uid_t uid); char *virGetUserConfigDirectory(void); char *virGetUserCacheDirectory(void); -char *virGetUserRuntimeDirectory(void) G_GNUC_NO_INLINE; +char *virGetUserRuntimeDirectory(void) G_NO_INLINE; char *virGetUserShell(uid_t uid); -char *virGetUserName(uid_t uid) G_GNUC_NO_INLINE; -char *virGetGroupName(gid_t gid) G_GNUC_NO_INLINE; +char *virGetUserName(uid_t uid) G_NO_INLINE; +char *virGetGroupName(gid_t gid) G_NO_INLINE; int virGetGroupList(uid_t uid, gid_t group, gid_t **groups) ATTRIBUTE_NONNULL(3); int virGetUserID(const char *name, @@ -119,16 +119,16 @@ int virParseOwnershipIds(const char *label, uid_t *ui= dPtr, gid_t *gidPtr); time_t virGetSelfLastChanged(void); void virUpdateSelfLastChanged(const char *path); =20 -long virGetSystemPageSize(void) G_GNUC_NO_INLINE; -long virGetSystemPageSizeKB(void) G_GNUC_NO_INLINE; +long virGetSystemPageSize(void) G_NO_INLINE; +long virGetSystemPageSizeKB(void) G_NO_INLINE; =20 unsigned long long virMemoryLimitTruncate(unsigned long long value); bool virMemoryLimitIsSet(unsigned long long value); -unsigned long long virMemoryMaxValue(bool ulong) G_GNUC_NO_INLINE; +unsigned long long virMemoryMaxValue(bool ulong) G_NO_INLINE; =20 bool virHostHasIOMMU(void); =20 -char *virHostGetDRMRenderNode(void) G_GNUC_NO_INLINE; +char *virHostGetDRMRenderNode(void) G_NO_INLINE; =20 /* Kernel cmdline match and comparison strategy for arg=3Dvalue pairs */ typedef enum { diff --git a/src/util/viruuid.h b/src/util/viruuid.h index b403b1906a..9667bd3200 100644 --- a/src/util/viruuid.h +++ b/src/util/viruuid.h @@ -41,11 +41,11 @@ =20 =20 int virSetHostUUIDStr(const char *host_uuid); -int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NONNULL(1) G_GNUC_N= O_INLINE; +int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NONNULL(1) G_NO_INL= INE; =20 bool virUUIDIsValid(const unsigned char *uuid); =20 -int virUUIDGenerate(unsigned char *uuid) G_GNUC_NO_INLINE; +int virUUIDGenerate(unsigned char *uuid) G_NO_INLINE; =20 int virUUIDParse(const char *uuidstr, unsigned char *uuid) --=20 2.35.1