Skip to content

Commit

Permalink
zephyr: add sof/trace/preproc.h
Browse files Browse the repository at this point in the history
Add Zephyr version of sof/trace/preproc.h interface. The full
preproc.h interface needed for CONFIG_TRACE is not duplicated
here, so this commit effectively prevents using CONFIG_TRACE
in Zephyr.

Link: thesofproject#9015
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
  • Loading branch information
kv2019i committed Oct 21, 2024
1 parent 6ec9590 commit 40f0911
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions zephyr/include/sof/trace/preproc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2024 Intel Corporation.
*/

#ifndef __SOF_TRACE_PREPROC_H__
#define __SOF_TRACE_PREPROC_H__

#ifdef CONFIG_TRACE
#error "SOF dma-trace (CONFIG_TRACE) not supported in Zephyr builds. \
Please use CONFIG_ZEPHYR_LOG instead."
#endif

#ifndef CONFIG_ZEPHYR_LOG

/*
* Unlike the XTOS version of this macro, this does not silence all
* compiler warnings about unused variables.
*/
#define SOF_TRACE_UNUSED(arg1, ...) ((void)arg1)

#endif /* CONFIG_ZEPHYR_LOG */

#endif /* __SOF_TRACE_PREPROC_H__ */

0 comments on commit 40f0911

Please sign in to comment.