From 79071b10f2a7b0b0d5229aa3428f602b97b894ea Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 7 May 2025 17:12:47 +0200 Subject: [PATCH] core/doc: Thread names are expected to be long-lived --- core/include/thread.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/include/thread.h b/core/include/thread.h index d562b46b89..b33951ba35 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -260,13 +260,16 @@ struct _thread { * is considered to be a bad programming practice and we strongly * discourage you from doing so. * + * @pre The @p name parameter must stay valid even after the thread has + * terminated (e.g. using a literal). + * * @param[out] stack start address of the preallocated stack memory * @param[in] stacksize the size of the thread's stack in bytes * @param[in] priority priority of the new thread, lower mean higher priority * @param[in] flags optional flags for the creation of the new thread * @param[in] task_func pointer to the code that is executed in the new thread * @param[in] arg the argument to the function - * @param[in] name a human readable descriptor for the thread + * @param[in] name a human readable descriptor for the thread. * * @return PID of newly created task on success * @retval -EINVAL @p priority is greater than or equal to