From 4f96620e0979c487f36f9dea5683f15f55d13ee9 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Wed, 6 May 2015 13:24:37 -0400 Subject: [PATCH] Cosmetic changes to microkernel timer type definition Revises comments to make it clear that the timer structure and its fields are not part of the public API. Also eliminates an unnecessary forward reference issue by defining the linked list fields of the timer structure using the structure name itself. Change-Id: Ic6489c38ab4e3a6408a0b9475bdd2956ae51c4a4 Signed-off-by: Allan Stephens --- include/microkernel/k_struct.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/microkernel/k_struct.h b/include/microkernel/k_struct.h index 545b1cb83b6..b1e9e32b15a 100644 --- a/include/microkernel/k_struct.h +++ b/include/microkernel/k_struct.h @@ -44,17 +44,19 @@ extern "C" { typedef union k_args_args K_ARGS_ARGS; -struct k_timer; -typedef struct k_timer K_TIMER; +/* Kernel timer structure (non-public) */ -struct k_timer { /* For pointer declarations only !! */ - /* Do not access fields in user code. */ - K_TIMER *Forw; - K_TIMER *Back; +struct k_timer { + struct k_timer *Forw; + struct k_timer *Back; int32_t duration; int32_t period; struct k_args *Args; -}; /* use K_TIMER as the timer type name */ +}; + +/* Kernel timer type (public) */ + +typedef struct k_timer K_TIMER; /* ---------------------------------------------------------------------- */ /* PROCESSOR SPECIFIC TYPES & DATA STRUCTURES */