From 0d094bec0505fdf1d203c3207a35271ceeda2f8b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 11 Dec 2014 14:29:58 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7569 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/include/nil.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'os/nil') diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index 556eeceb0..0ed960588 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -284,11 +284,16 @@ extern stkalign_t __main_thread_stack_base__, __main_thread_stack_end__; typedef struct port_intctx intctx_t; /** - * @brief Type of a structure representing a counting semaphore. + * @brief Type of a structure representing a semaphore. */ -typedef struct { +typedef struct nil_semaphore semaphore_t; + +/** + * @brief Structure representing a counting semaphore. + */ +struct nil_semaphore { volatile cnt_t cnt; /**< @brief Semaphore counter. */ -} semaphore_t; +}; /** * @brief Thread function. @@ -300,11 +305,6 @@ typedef void (*tfunc_t)(void *); */ typedef struct nil_thread_cfg thread_config_t; -/** - * @brief Type of a structure representing a thread. - */ -typedef struct nil_thread thread_t; - /** * @brief Structure representing a thread static configuration. */ @@ -316,6 +316,11 @@ struct nil_thread_cfg { void *arg; /**< @brief Thread function argument. */ }; +/** + * @brief Type of a structure representing a thread. + */ +typedef struct nil_thread thread_t; + /** * @brief Type of a thread reference. */ @@ -350,12 +355,17 @@ struct nil_thread { NIL_CFG_THREAD_EXT_FIELDS }; +/** + * @brief Type of a structure representing the system. + */ +typedef struct nil_system nil_system_t; + /** * @brief System data structure. * @note This structure contain all the data areas used by the OS except * stacks. */ -typedef struct { +struct nil_system { /** * @brief Pointer to the running thread. */ @@ -396,7 +406,7 @@ typedef struct { */ const char * volatile dbg_panic_msg; #endif -} nil_system_t; +}; /*===========================================================================*/ /* Module macros. */ -- cgit v1.2.3