Skip to content

Commit af46f62

Browse files
committed
include: kernel: doc: add doxygen for k_sem
It can be confusing for users browsing the API docs to not find any documentation for the k_sem structure. This commit adds doxygen comments so that it now shows up. Fixes #90608. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent c7e36f0 commit af46f62

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

include/zephyr/kernel.h

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,10 +3261,21 @@ __syscall int k_condvar_wait(struct k_condvar *condvar, struct k_mutex *mutex,
32613261
*/
32623262

32633263
/**
3264-
* @cond INTERNAL_HIDDEN
3264+
* @defgroup semaphore_apis Semaphore APIs
3265+
* @ingroup kernel_apis
3266+
* @{
32653267
*/
32663268

3269+
/**
3270+
* @brief Semaphore structure
3271+
*
3272+
* This structure is used to represent a semaphore.
3273+
* All the members are internal and should not be accessed directly.
3274+
*/
32673275
struct k_sem {
3276+
/**
3277+
* @cond INTERNAL_HIDDEN
3278+
*/
32683279
_wait_q_t wait_q;
32693280
unsigned int count;
32703281
unsigned int limit;
@@ -3276,8 +3287,13 @@ struct k_sem {
32763287
#ifdef CONFIG_OBJ_CORE_SEM
32773288
struct k_obj_core obj_core;
32783289
#endif
3290+
/** @endcond */
32793291
};
32803292

3293+
/**
3294+
* @cond INTERNAL_HIDDEN
3295+
*/
3296+
32813297
#define Z_SEM_INITIALIZER(obj, initial_count, count_limit) \
32823298
{ \
32833299
.wait_q = Z_WAIT_Q_INIT(&(obj).wait_q), \
@@ -3287,13 +3303,7 @@ struct k_sem {
32873303
}
32883304

32893305
/**
3290-
* INTERNAL_HIDDEN @endcond
3291-
*/
3292-
3293-
/**
3294-
* @defgroup semaphore_apis Semaphore APIs
3295-
* @ingroup kernel_apis
3296-
* @{
3306+
* @endcond
32973307
*/
32983308

32993309
/**

0 commit comments

Comments
 (0)