From c9f05efbb7ebc9e365ee1d5122df26e16c50a2ab Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 16 Feb 2016 13:43:10 +0100 Subject: [PATCH] doc: atomic: provide explanation about why atomic_int_t is struct See also https://github.com/RIOT-OS/RIOT/pull/2321#issuecomment-72088818 --- core/include/atomic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/include/atomic.h b/core/include/atomic.h index 5fb20fc1d0..07d663cbd4 100644 --- a/core/include/atomic.h +++ b/core/include/atomic.h @@ -27,6 +27,9 @@ extern "C" { /** * @brief Integer variable for use in atomic counters. + * + * @note This type is a struct for hard type checking (let the compiler warn + * if int is assigned regularly). */ typedef struct atomic_int { volatile int value; /**< the actual value */