mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-01 21:23:59 +00:00
Add two files to do compile time assert. One is arch specific, and put in hypervisor/arch/x86/. The other one is common, and put in hypervisor/common/. If the statement is not true, there will be error during compile time. The file will not increase the size of HV binary. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
13 lines
313 B
C
13 lines
313 B
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#include <acrn_common.h>
|
|
|
|
#define CAT_(A,B) A ## B
|
|
#define CTASSERT(expr) \
|
|
typedef int CAT_(CTA_DummyType,__LINE__)[(expr) ? 1 : -1]
|
|
|
|
CTASSERT(sizeof(struct vhm_request) == (4096U/VHM_REQUEST_MAX));
|