Message ID | 20201124190744.11343-8-paul@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=fYmn=E6=lists.xenproject.org=xen-devel-bounces@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DFAAC64E75 for <xen-devel@archiver.kernel.org>; Tue, 24 Nov 2020 19:08:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA4C1206E5 for <xen-devel@archiver.kernel.org>; Tue, 24 Nov 2020 19:08:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="kNHSiQ85" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA4C1206E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.36810.68907 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1khdfR-0001YM-3d; Tue, 24 Nov 2020 19:07:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 36810.68907; Tue, 24 Nov 2020 19:07:57 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1khdfQ-0001Xx-Vv; Tue, 24 Nov 2020 19:07:56 +0000 Received: by outflank-mailman (input) for mailman id 36810; Tue, 24 Nov 2020 19:07:55 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfP-0001UU-6h for xen-devel@lists.xenproject.org; Tue, 24 Nov 2020 19:07:55 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfO-0003tH-4N; Tue, 24 Nov 2020 19:07:54 +0000 Received: from host86-183-162-145.range86-183.btcentralplus.com ([86.183.162.145] helo=u2f063a87eabd5f.home) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfN-0000r4-S6; Tue, 24 Nov 2020 19:07:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfP-0001UU-6h for xen-devel@lists.xenproject.org; Tue, 24 Nov 2020 19:07:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=UWkIBqTtAF5BCGvfGIil7ROCWJIpScItP3D5RKMBLJo=; b=kNHSiQ85ejPIPK+pAkadfc9DMc iF3Eq0OYhffj0XtWTMweG1TPq/KKKX9hj2j7mJmcje3nh8EW46ARoLtOlvowRPXhhTJhrMD8GKTlt WVGu6HoEtE1WgzEUCTe/kdDPxImm6BqBOqxo6CVKxABWc3sNIN+HYc02tPDLAHVjGtEQ=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfO-0003tH-4N; Tue, 24 Nov 2020 19:07:54 +0000 Received: from host86-183-162-145.range86-183.btcentralplus.com ([86.183.162.145] helo=u2f063a87eabd5f.home) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <paul@xen.org>) id 1khdfN-0000r4-S6; Tue, 24 Nov 2020 19:07:54 +0000 From: Paul Durrant <paul@xen.org> To: xen-devel@lists.xenproject.org Cc: Paul Durrant <pdurrant@amazon.com>, Jan Beulich <jbeulich@suse.com>, Andrew Cooper <andrew.cooper3@citrix.com>, George Dunlap <george.dunlap@citrix.com>, Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>, Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org> Subject: [PATCH v3 07/13] xen/include: import sizeof_field() macro from Linux stddef.h Date: Tue, 24 Nov 2020 19:07:38 +0000 Message-Id: <20201124190744.11343-8-paul@xen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201124190744.11343-1-paul@xen.org> References: <20201124190744.11343-1-paul@xen.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
viridian: add support for ExProcessorMasks...
|
expand
|
diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index c0e0ee9f27be..676c6ea1b0a0 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -76,6 +76,14 @@ #define offsetof(a,b) __builtin_offsetof(a,b) +/** + * sizeof_field(TYPE, MEMBER) + * + * @TYPE: The structure containing the field of interest + * @MEMBER: The field to return the size of + */ +#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) + #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L #define alignof __alignof__ #endif