mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
hv: clean up function definitions in logmsg.h
seperate the function definitions into debug/release directories to better distinguish debug/release libraries Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
5b6c611a1d
commit
8920fbacaa
@ -31,9 +31,6 @@
|
|||||||
extern uint16_t console_loglevel;
|
extern uint16_t console_loglevel;
|
||||||
extern uint16_t mem_loglevel;
|
extern uint16_t mem_loglevel;
|
||||||
extern uint16_t npk_loglevel;
|
extern uint16_t npk_loglevel;
|
||||||
void init_logmsg(uint32_t flags);
|
|
||||||
void print_logmsg_buffer(uint16_t pcpu_id);
|
|
||||||
void do_logmsg(uint32_t severity, const char *fmt, ...);
|
|
||||||
|
|
||||||
void asm_assert(int32_t line, const char *file, const char *txt);
|
void asm_assert(int32_t line, const char *file, const char *txt);
|
||||||
|
|
||||||
@ -44,6 +41,16 @@ void asm_assert(int32_t line, const char *file, const char *txt);
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#else /* HV_DEBUG */
|
||||||
|
|
||||||
|
#define ASSERT(x, ...) do { } while (0)
|
||||||
|
|
||||||
|
#endif /* HV_DEBUG */
|
||||||
|
|
||||||
|
void init_logmsg(uint32_t flags);
|
||||||
|
void print_logmsg_buffer(uint16_t pcpu_id);
|
||||||
|
void do_logmsg(uint32_t severity, const char *fmt, ...);
|
||||||
|
|
||||||
/** The well known printf() function.
|
/** The well known printf() function.
|
||||||
*
|
*
|
||||||
* Formats a string and writes it to the console output.
|
* Formats a string and writes it to the console output.
|
||||||
@ -68,35 +75,6 @@ void printf(const char *fmt, ...);
|
|||||||
|
|
||||||
void vprintf(const char *fmt, va_list args);
|
void vprintf(const char *fmt, va_list args);
|
||||||
|
|
||||||
#else /* HV_DEBUG */
|
|
||||||
|
|
||||||
static inline void init_logmsg(__unused uint32_t flags)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void do_logmsg(__unused uint32_t severity,
|
|
||||||
__unused const char *fmt, ...)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void print_logmsg_buffer(__unused uint16_t pcpu_id)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ASSERT(x, ...) do { } while (0)
|
|
||||||
|
|
||||||
static inline void printf(__unused const char *fmt, ...)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void vprintf(__unused const char *fmt, __unused va_list args)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HV_DEBUG */
|
|
||||||
|
|
||||||
#ifndef pr_prefix
|
#ifndef pr_prefix
|
||||||
#define pr_prefix
|
#define pr_prefix
|
||||||
#endif
|
#endif
|
||||||
|
13
hypervisor/release/logmsg.c
Normal file
13
hypervisor/release/logmsg.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <hypervisor.h>
|
||||||
|
|
||||||
|
void init_logmsg(__unused uint32_t flags) {}
|
||||||
|
void do_logmsg(__unused uint32_t severity, __unused const char *fmt, ...) {}
|
||||||
|
void print_logmsg_buffer(__unused uint16_t pcpu_id) {}
|
||||||
|
void printf(__unused const char *fmt, ...) {}
|
||||||
|
void vprintf(__unused const char *fmt, __unused va_list args) {}
|
Loading…
Reference in New Issue
Block a user