build: namespace the generated headers with `zephyr/`
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.
Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.
Updated the includes path of in-tree sources accordingly.
Most of the changes here are scripted, check the PR for more
info.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
diff --git a/kernel/msg_q.c b/kernel/msg_q.c
index 5214902..0c46109 100644
--- a/kernel/msg_q.c
+++ b/kernel/msg_q.c
@@ -97,7 +97,7 @@
return z_impl_k_msgq_alloc_init(msgq, msg_size, max_msgs);
}
-#include <syscalls/k_msgq_alloc_init_mrsh.c>
+#include <zephyr/syscalls/k_msgq_alloc_init_mrsh.c>
#endif /* CONFIG_USERSPACE */
int k_msgq_cleanup(struct k_msgq *msgq)
@@ -192,7 +192,7 @@
return z_impl_k_msgq_put(msgq, data, timeout);
}
-#include <syscalls/k_msgq_put_mrsh.c>
+#include <zephyr/syscalls/k_msgq_put_mrsh.c>
#endif /* CONFIG_USERSPACE */
void z_impl_k_msgq_get_attrs(struct k_msgq *msgq, struct k_msgq_attrs *attrs)
@@ -210,7 +210,7 @@
K_OOPS(K_SYSCALL_MEMORY_WRITE(attrs, sizeof(struct k_msgq_attrs)));
z_impl_k_msgq_get_attrs(msgq, attrs);
}
-#include <syscalls/k_msgq_get_attrs_mrsh.c>
+#include <zephyr/syscalls/k_msgq_get_attrs_mrsh.c>
#endif /* CONFIG_USERSPACE */
int z_impl_k_msgq_get(struct k_msgq *msgq, void *data, k_timeout_t timeout)
@@ -290,7 +290,7 @@
return z_impl_k_msgq_get(msgq, data, timeout);
}
-#include <syscalls/k_msgq_get_mrsh.c>
+#include <zephyr/syscalls/k_msgq_get_mrsh.c>
#endif /* CONFIG_USERSPACE */
int z_impl_k_msgq_peek(struct k_msgq *msgq, void *data)
@@ -324,7 +324,7 @@
return z_impl_k_msgq_peek(msgq, data);
}
-#include <syscalls/k_msgq_peek_mrsh.c>
+#include <zephyr/syscalls/k_msgq_peek_mrsh.c>
#endif /* CONFIG_USERSPACE */
int z_impl_k_msgq_peek_at(struct k_msgq *msgq, void *data, uint32_t idx)
@@ -370,7 +370,7 @@
return z_impl_k_msgq_peek_at(msgq, data, idx);
}
-#include <syscalls/k_msgq_peek_at_mrsh.c>
+#include <zephyr/syscalls/k_msgq_peek_at_mrsh.c>
#endif /* CONFIG_USERSPACE */
void z_impl_k_msgq_purge(struct k_msgq *msgq)
@@ -401,21 +401,21 @@
K_OOPS(K_SYSCALL_OBJ(msgq, K_OBJ_MSGQ));
z_impl_k_msgq_purge(msgq);
}
-#include <syscalls/k_msgq_purge_mrsh.c>
+#include <zephyr/syscalls/k_msgq_purge_mrsh.c>
static inline uint32_t z_vrfy_k_msgq_num_free_get(struct k_msgq *msgq)
{
K_OOPS(K_SYSCALL_OBJ(msgq, K_OBJ_MSGQ));
return z_impl_k_msgq_num_free_get(msgq);
}
-#include <syscalls/k_msgq_num_free_get_mrsh.c>
+#include <zephyr/syscalls/k_msgq_num_free_get_mrsh.c>
static inline uint32_t z_vrfy_k_msgq_num_used_get(struct k_msgq *msgq)
{
K_OOPS(K_SYSCALL_OBJ(msgq, K_OBJ_MSGQ));
return z_impl_k_msgq_num_used_get(msgq);
}
-#include <syscalls/k_msgq_num_used_get_mrsh.c>
+#include <zephyr/syscalls/k_msgq_num_used_get_mrsh.c>
#endif /* CONFIG_USERSPACE */