Skip to content

Commit a57ceb7

Browse files
committed
Revert "include: Add dummy field for Rust as well as CPP"
This reverts commit 2046760. 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: David Brown <[email protected]>
1 parent c93d7a5 commit a57ceb7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/zephyr/kernel/thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ typedef struct k_thread_runtime_stats {
237237
uint64_t idle_cycles;
238238
#endif /* CONFIG_SCHED_THREAD_USAGE_ALL */
239239

240-
#if (defined(__cplusplus) || CONFIG_RUST) && !defined(CONFIG_SCHED_THREAD_USAGE) && \
240+
#if defined(__cplusplus) && !defined(CONFIG_SCHED_THREAD_USAGE) && \
241241
!defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL)
242242
/* If none of the above Kconfig values are defined, this struct will have a size 0 in C
243243
* which is not allowed in C++ (it'll have a size 1). To prevent this, we add a 1 byte dummy

include/zephyr/spinlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct k_spinlock {
7878
#endif /* CONFIG_SPIN_LOCK_TIME_LIMIT */
7979
#endif /* CONFIG_SPIN_VALIDATE */
8080

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

0 commit comments

Comments
 (0)