Commit a57ceb78 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

Revert "include: Add dummy field for Rust as well as CPP"

This reverts commit 2046760e71d3cb1880c372b545d037222026ee9c.

Put these back so we get the zero element structures when using just
rust and not CPP.  A subsequent patch will suppress the warning.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent c93d7a5e
Loading
Loading
Loading
Loading
+1 −1
Changes for include/zephyr/kernel/thread.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ typedef struct k_thread_runtime_stats {
	uint64_t idle_cycles;
#endif /* CONFIG_SCHED_THREAD_USAGE_ALL */

#if (defined(__cplusplus) || CONFIG_RUST) && !defined(CONFIG_SCHED_THREAD_USAGE) &&	\
#if defined(__cplusplus) && !defined(CONFIG_SCHED_THREAD_USAGE) &&                                 \
	!defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL)
	/* If none of the above Kconfig values are defined, this struct will have a size 0 in C
	 * which is not allowed in C++ (it'll have a size 1). To prevent this, we add a 1 byte dummy
+1 −1
Changes for include/zephyr/spinlock.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ struct k_spinlock {
#endif /* CONFIG_SPIN_LOCK_TIME_LIMIT */
#endif /* CONFIG_SPIN_VALIDATE */

#if (defined(CONFIG_CPP) || defined(CONFIG_RUST)) && !defined(CONFIG_SMP) && \
#if defined(CONFIG_CPP) && !defined(CONFIG_SMP) && \
	!defined(CONFIG_SPIN_VALIDATE)
	/* If CONFIG_SMP and CONFIG_SPIN_VALIDATE are both not defined
	 * the k_spinlock struct will have no members. The result