From nobody Sun Feb 8 18:44:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571142102; cv=none; d=zoho.com; s=zohoarc; b=BXNXYYspdvk4kYfWDy7MI7lcXAYO/57y656iHP3aXXuYp5lASM+2xrx+urUI6pQg9t6cRdSYHyVU5j5VSY0pEy9cQgHJ8A9va8/1KQzNWna1bo6Hj4z+lFfD4CVWPJIw55jJSYmmleQIE6tmfy9JR6u1tenozXlmkj32dVLryrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571142102; 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=5cgVj3J3emvuYDWAQY/Ylc0lvSvIb71F8PBE2aNmY6o=; b=Hn9DDQreaCcnwDZdjTTXMjShC5w5eC9kFna/puDh9FcgRAzoP7DTIu4SIG6j7xwET13Kyp7l5udfl1NtkXXOJ573obgbY/BwcfE1x3B8uj63nac00VzOH9wdS+tOxsqe33VYMpsUrYNjjclM221S4f79SPwn98LbYgI17FYCKg8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571142102830989.2885555547895; Tue, 15 Oct 2019 05:21:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9C31190C02F; Tue, 15 Oct 2019 12:21:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C0D111001DF0; Tue, 15 Oct 2019 12:21:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7DFE84EE6A; Tue, 15 Oct 2019 12:21:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9FCLaJu013718 for ; Tue, 15 Oct 2019 08:21:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id E245B60A35; Tue, 15 Oct 2019 12:21:36 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 430E8608C2 for ; Tue, 15 Oct 2019 12:21:36 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 Oct 2019 14:21:25 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/8] Use G_GNUC_NO_INLINE instead of ATTRIBUTE_NOINLINE X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Tue, 15 Oct 2019 12:21:41 +0000 (UTC) Define the macro for older GLib versions. Signed-off-by: J=C3=A1n Tomko --- build-aux/mock-noinline.pl | 2 +- build-aux/syntax-check.mk | 2 +- src/internal.h | 8 +++++--- src/qemu/qemu_capspriv.h | 2 +- src/rpc/virnetsocket.h | 4 ++-- src/util/vircommand.h | 2 +- src/util/virfile.h | 16 ++++++++-------- src/util/virhashcode.h | 2 +- src/util/virhostcpu.h | 4 ++-- src/util/virhostuptime.h | 2 +- src/util/virmacaddr.h | 2 +- src/util/virnetdev.h | 10 +++++----- src/util/virnetdevip.h | 2 +- src/util/virnetdevmacvlan.h | 2 +- src/util/virnetdevopenvswitch.h | 2 +- src/util/virnetdevtap.h | 6 +++--- src/util/virnuma.h | 16 ++++++++-------- src/util/virprocess.h | 4 ++-- src/util/virrandom.h | 6 +++--- src/util/virscsi.h | 2 +- src/util/virscsivhost.h | 2 +- src/util/virtpm.h | 2 +- src/util/virutil.h | 12 ++++++------ src/util/viruuid.h | 2 +- 24 files changed, 58 insertions(+), 56 deletions(-) diff --git a/build-aux/mock-noinline.pl b/build-aux/mock-noinline.pl index db5420825f..b005b8d95e 100644 --- a/build-aux/mock-noinline.pl +++ b/build-aux/mock-noinline.pl @@ -46,7 +46,7 @@ sub scan_annotations { } elsif (/^\s*$/) { $func =3D undef; } - if (/ATTRIBUTE_NOINLINE/) { + if (/G_GNUC_NO_INLINE/) { if (defined $func) { $noninlined{$func} =3D 1; } diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index c0612a3319..c8ca6279a2 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -629,7 +629,7 @@ sc_avoid_g_gnuc_unused_in_header: $(_sc_search_regexp) =20 sc_prohibit_attribute_macros: - @prohibit=3D'ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK)' \ + @prohibit=3D'ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK|NOINLINE)' \ in_vc_files=3D'\.[ch]$$' \ halt=3D'use GLib macros: G_GNUC_ for most' \ $(_sc_search_regexp) diff --git a/src/internal.h b/src/internal.h index 7737d9a209..e2e27342d7 100644 --- a/src/internal.h +++ b/src/internal.h @@ -94,13 +94,15 @@ #define ARRAY_CARDINALITY(Array) (sizeof(Array) / sizeof(*(Array))) =20 /** - * ATTRIBUTE_NOINLINE: + * 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 ATTRIBUTE_NOINLINE -# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) +#ifndef G_GNUC_NO_INLINE +# define G_GNUC_NO_INLINE __attribute__((__noinline__)) #endif =20 /** diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 6b54e94fd3..e8fe48d8f0 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -83,7 +83,7 @@ virQEMUCapsGetCPUModelX86Data(virQEMUCapsPtr qemuCaps, =20 virCPUDefPtr virQEMUCapsProbeHostCPU(virArch hostArch, - virDomainCapsCPUModelsPtr models) ATTRIBUTE_NOINLI= NE; + virDomainCapsCPUModelsPtr models) G_GNUC_NO_INLINE; =20 void virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCaps, diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h index 2f626cb08f..8d075464cb 100644 --- a/src/rpc/virnetsocket.h +++ b/src/rpc/virnetsocket.h @@ -136,10 +136,10 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock, gid_t *gid, pid_t *pid, unsigned long long *timestamp) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; int virNetSocketGetSELinuxContext(virNetSocketPtr sock, char **context) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virNetSocketSetBlocking(virNetSocketPtr sock, bool blocking); diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 6bc1ef87b0..10961a328f 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -58,7 +58,7 @@ typedef enum { =20 void virCommandPassFD(virCommandPtr cmd, int fd, - unsigned int flags) ATTRIBUTE_NOINLINE; + unsigned int flags) G_GNUC_NO_INLINE; =20 int virCommandPassFDGetFDIndex(virCommandPtr cmd, int fd); diff --git a/src/util/virfile.h b/src/util/virfile.h index a66e3569a3..555e6ebee7 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -114,9 +114,9 @@ int virFileWrapperFdClose(virFileWrapperFdPtr dfd); void virFileWrapperFdFree(virFileWrapperFdPtr dfd); =20 int virFileLock(int fd, bool shared, off_t start, off_t len, bool waitForL= ock) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; int virFileUnlock(int fd, off_t start, off_t len) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virFileFlock(int fd, bool lock, bool shared); =20 @@ -199,7 +199,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) ATTRIBUTE_NOINLI= NE; +bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_GNUC_NO_INLINE; bool virFileIsExecutable(const char *file) ATTRIBUTE_NONNULL(1); bool virFileIsRegular(const char *file) ATTRIBUTE_NONNULL(1); =20 @@ -231,7 +231,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) ATTRIBUTE_NOINLINE; +char *virFileCanonicalizePath(const char *path) G_GNUC_NO_INLINE; =20 enum { VIR_FILE_OPEN_NONE =3D 0, @@ -383,18 +383,18 @@ VIR_DEFINE_AUTOPTR_FUNC(virFileWrapperFd, virFileWrap= perFdFree); int virFileGetXAttr(const char *path, const char *name, char **value) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virFileGetXAttrQuiet(const char *path, const char *name, char **value) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virFileSetXAttr(const char *path, const char *name, const char *value) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virFileRemoveXAttr(const char *path, const char *name) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h index af877c93cc..e23b0c3615 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) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h index 2ba79b97a5..d95d380d4a 100644 --- a/src/util/virhostcpu.h +++ b/src/util/virhostcpu.h @@ -44,7 +44,7 @@ bool virHostCPUHasBitmap(void); virBitmapPtr virHostCPUGetPresentBitmap(void); virBitmapPtr virHostCPUGetOnlineBitmap(void); int virHostCPUGetCount(void); -int virHostCPUGetThreadsPerSubcore(virArch arch) ATTRIBUTE_NOINLINE; +int virHostCPUGetThreadsPerSubcore(virArch arch) G_GNUC_NO_INLINE; =20 int virHostCPUGetMap(unsigned char **cpumap, unsigned int *online, @@ -57,7 +57,7 @@ int virHostCPUGetInfo(virArch hostarch, unsigned int *cores, unsigned int *threads); =20 -int virHostCPUGetKVMMaxVCPUs(void) ATTRIBUTE_NOINLINE; +int virHostCPUGetKVMMaxVCPUs(void) G_GNUC_NO_INLINE; =20 int virHostCPUStatsAssign(virNodeCPUStatsPtr param, const char *name, diff --git a/src/util/virhostuptime.h b/src/util/virhostuptime.h index 03c1517a64..7e2c4c0c81 100644 --- a/src/util/virhostuptime.h +++ b/src/util/virhostuptime.h @@ -24,4 +24,4 @@ =20 int virHostGetBootTime(unsigned long long *when) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h index cf26a8bbfa..843893d759 100644 --- a/src/util/virmacaddr.h +++ b/src/util/virmacaddr.h @@ -52,7 +52,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], - virMacAddrPtr addr) ATTRIBUTE_NOINLINE; + virMacAddrPtr addr) G_GNUC_NO_INLINE; int virMacAddrParse(const char* str, virMacAddrPtr addr) G_GNUC_WARN_UNUSED_RESULT; int virMacAddrParseHex(const char* str, diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index ff8df31a37..854fddfe77 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -150,11 +150,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 ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 int virNetDevSetOnline(const char *ifname, bool online) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; int virNetDevGetOnline(const char *ifname, bool *online) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; @@ -162,7 +162,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 AT= TRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= GNUC_NO_INLINE; int virNetDevGetMAC(const char *ifname, virMacAddrPtr macaddr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; @@ -306,9 +306,9 @@ 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 ATTRIBUTE_NOINLINE; + G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 int virNetDevRunEthernetScript(const char *ifname, const char *script) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 VIR_DEFINE_AUTOPTR_FUNC(virNetDevRxFilter, virNetDevRxFilterFree); diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h index 43271f827b..7af94a49d7 100644 --- a/src/util/virnetdevip.h +++ b/src/util/virnetdevip.h @@ -63,7 +63,7 @@ int virNetDevIPAddrAdd(const char *ifname, virSocketAddr *addr, virSocketAddr *peer, unsigned int prefix) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT AT= TRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_= GNUC_NO_INLINE; int virNetDevIPRouteAdd(const char *ifname, virSocketAddrPtr addr, unsigned int prefix, diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index 4c153dfb5c..30038a45b5 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -58,7 +58,7 @@ int virNetDevMacVLanReserveName(const char *name, bool qu= ietfail); int virNetDevMacVLanReleaseName(const char *name); =20 bool virNetDevMacVLanIsMacvtap(const char *ifname) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 int virNetDevMacVLanCreate(const char *ifname, const char *type, diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitc= h.h index b70ee7a559..2e15384b5f 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -62,7 +62,7 @@ int virNetDevOpenvswitchInterfaceGetMaster(const char *if= name, char **master) =20 int virNetDevOpenvswitchGetVhostuserIfname(const char *path, char **ifname) - ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 int virNetDevOpenvswitchUpdateVlan(const char *ifname, virNetDevVlanPtr virtVlan) diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h index 36c2be777e..cbc799bdbe 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 ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_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 ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 typedef enum { VIR_NETDEV_TAP_CREATE_NONE =3D 0, @@ -96,7 +96,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 ATTRIBUTE_NOINLINE; + G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; =20 int virNetDevTapInterfaceStats(const char *ifname, virDomainInterfaceStatsPtr stats, diff --git a/src/util/virnuma.h b/src/util/virnuma.h index 3afccdf08f..5a6b36f7e9 100644 --- a/src/util/virnuma.h +++ b/src/util/virnuma.h @@ -33,20 +33,20 @@ int virNumaSetupMemoryPolicy(virDomainNumatuneMemMode m= ode, virBitmapPtr nodeset); =20 virBitmapPtr virNumaGetHostMemoryNodeset(void); -bool virNumaNodesetIsAvailable(virBitmapPtr nodeset) ATTRIBUTE_NOINLINE; -bool virNumaIsAvailable(void) ATTRIBUTE_NOINLINE; -int virNumaGetMaxNode(void) ATTRIBUTE_NOINLINE; -bool virNumaNodeIsAvailable(int node) ATTRIBUTE_NOINLINE; +bool virNumaNodesetIsAvailable(virBitmapPtr 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; int virNumaGetDistances(int node, int **distances, - int *ndistances) ATTRIBUTE_NOINLINE; + int *ndistances) G_GNUC_NO_INLINE; int virNumaGetNodeMemory(int node, unsigned long long *memsize, - unsigned long long *memfree) ATTRIBUTE_NOINLINE; + unsigned long long *memfree) G_GNUC_NO_INLINE; =20 unsigned int virNumaGetMaxCPUs(void); =20 -int virNumaGetNodeCPUs(int node, virBitmapPtr *cpus) ATTRIBUTE_NOINLINE; +int virNumaGetNodeCPUs(int node, virBitmapPtr *cpus) G_GNUC_NO_INLINE; int virNumaNodesetToCPUset(virBitmapPtr nodeset, virBitmapPtr *cpuset); =20 @@ -60,7 +60,7 @@ int virNumaGetPages(int node, unsigned long long **pages_avail, unsigned long long **pages_free, size_t *npages) - ATTRIBUTE_NONNULL(5) ATTRIBUTE_NOINLINE; + ATTRIBUTE_NONNULL(5) G_GNUC_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 b2a3a0a7a6..04adae6b82 100644 --- a/src/util/virprocess.h +++ b/src/util/virprocess.h @@ -75,7 +75,7 @@ int virProcessGetNamespaces(pid_t pid, int virProcessSetNamespaces(size_t nfdlist, int *fdlist); =20 -int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) ATTRIBUTE= _NOINLINE; +int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_GNUC_NO= _INLINE; 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); @@ -108,7 +108,7 @@ typedef int (*virProcessForkCallback)(pid_t ppid, =20 int virProcessRunInFork(virProcessForkCallback cb, void *opaque) - ATTRIBUTE_NOINLINE; + G_GNUC_NO_INLINE; =20 int virProcessSetupPrivateMountNS(void); =20 diff --git a/src/util/virrandom.h b/src/util/virrandom.h index 60f9aaf530..297721f912 100644 --- a/src/util/virrandom.h +++ b/src/util/virrandom.h @@ -20,9 +20,9 @@ =20 #include "internal.h" =20 -uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE; +uint64_t virRandomBits(int nbits) G_GNUC_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 ATTRIBUTE_NOINLINE; -int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOIN= LINE; + 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; diff --git a/src/util/virscsi.h b/src/util/virscsi.h index 8c2c84e07b..cfd6ac7356 100644 --- a/src/util/virscsi.h +++ b/src/util/virscsi.h @@ -37,7 +37,7 @@ char *virSCSIDeviceGetSgName(const char *sysfs_prefix, const char *adapter, unsigned int bus, unsigned int target, - unsigned long long unit) ATTRIBUTE_NOINLINE; + unsigned long long unit) G_GNUC_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 334eb81af6..52f5d2c33f 100644 --- a/src/util/virscsivhost.h +++ b/src/util/virscsivhost.h @@ -61,6 +61,6 @@ void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevicePtr de= v, const char **drv_name, const char **dom_name); void virSCSIVHostDeviceFree(virSCSIVHostDevicePtr dev); -int virSCSIVHostOpenVhostSCSI(int *vhostfd) ATTRIBUTE_NOINLINE; +int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_GNUC_NO_INLINE; =20 VIR_DEFINE_AUTOPTR_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree); diff --git a/src/util/virtpm.h b/src/util/virtpm.h index 50948aac9a..d021a083b4 100644 --- a/src/util/virtpm.h +++ b/src/util/virtpm.h @@ -20,7 +20,7 @@ =20 #pragma once =20 -char *virTPMCreateCancelPath(const char *devpath) ATTRIBUTE_NOINLINE; +char *virTPMCreateCancelPath(const char *devpath) G_GNUC_NO_INLINE; =20 char *virTPMGetSwtpm(void); char *virTPMGetSwtpmSetup(void); diff --git a/src/util/virutil.h b/src/util/virutil.h index d265d698d0..1a6ae1787a 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -103,8 +103,8 @@ char *virGetUserConfigDirectory(void); char *virGetUserCacheDirectory(void); char *virGetUserRuntimeDirectory(void); char *virGetUserShell(uid_t uid); -char *virGetUserName(uid_t uid) ATTRIBUTE_NOINLINE; -char *virGetGroupName(gid_t gid) ATTRIBUTE_NOINLINE; +char *virGetUserName(uid_t uid) G_GNUC_NO_INLINE; +char *virGetGroupName(gid_t gid) G_GNUC_NO_INLINE; int virGetGroupList(uid_t uid, gid_t group, gid_t **groups) ATTRIBUTE_NONNULL(3); int virGetUserID(const char *name, @@ -138,16 +138,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) ATTRIBUTE_NOINLINE; -long virGetSystemPageSizeKB(void) ATTRIBUTE_NOINLINE; +long virGetSystemPageSize(void) G_GNUC_NO_INLINE; +long virGetSystemPageSizeKB(void) G_GNUC_NO_INLINE; =20 unsigned long long virMemoryLimitTruncate(unsigned long long value); bool virMemoryLimitIsSet(unsigned long long value); -unsigned long long virMemoryMaxValue(bool ulong) ATTRIBUTE_NOINLINE; +unsigned long long virMemoryMaxValue(bool ulong) G_GNUC_NO_INLINE; =20 bool virHostHasIOMMU(void); =20 -char *virHostGetDRMRenderNode(void) ATTRIBUTE_NOINLINE; +char *virHostGetDRMRenderNode(void) G_GNUC_NO_INLINE; =20 /** * VIR_ASSIGN_IS_OVERFLOW: diff --git a/src/util/viruuid.h b/src/util/viruuid.h index 54fbd88805..6ea01bb7c1 100644 --- a/src/util/viruuid.h +++ b/src/util/viruuid.h @@ -45,7 +45,7 @@ int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NO= NNULL(1); =20 int virUUIDIsValid(unsigned char *uuid); =20 -int virUUIDGenerate(unsigned char *uuid) ATTRIBUTE_NOINLINE; +int virUUIDGenerate(unsigned char *uuid) G_GNUC_NO_INLINE; =20 int virUUIDParse(const char *uuidstr, unsigned char *uuid) --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list