More infos in chtypes.h.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9292 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2016-04-16 16:12:51 +00:00
parent 9d3bca73d4
commit d57f928014
9 changed files with 158 additions and 50 deletions

View File

@ -78,8 +78,8 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE __attribute__((noinline))
@ -98,6 +98,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */

View File

@ -78,8 +78,8 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE __attribute__((noinline))
@ -98,6 +98,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */

View File

@ -78,10 +78,10 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE
#define NOINLINE _Pragma("inline=never")
/**
* @brief Optimized thread function declaration macro.
@ -96,7 +96,19 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Memory alignment enforcement for variables.
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
#define ALIGNED_VAR(n) _Pragma(__CH_STRINGIFY(data_alignment=##n))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */

View File

@ -78,10 +78,10 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE
#define NOINLINE __attribute__((noinline))
/**
* @brief Optimized thread function declaration macro.
@ -98,6 +98,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */

View File

@ -98,6 +98,18 @@ typedef uint8_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 2
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */

View File

@ -90,8 +90,8 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE __attribute__((noinline))
@ -110,6 +110,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */

View File

@ -78,8 +78,8 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE __attribute__((noinline))
@ -98,6 +98,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 0
#endif /* CHTYPES_H */
/** @} */

View File

@ -78,8 +78,8 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Makes functions not inlineable.
* @note If the compiler does not support such attribute then the
* realtime counter precision could be degraded.
* @note If the compiler does not support such attribute then some
* time-dependent services could be degraded.
*/
#define NOINLINE __attribute__((noinline))
@ -98,6 +98,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 0
#endif /* CHTYPES_H */
/** @} */

View File

@ -102,6 +102,18 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
*/
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
/**
* @brief Size of a pointer.
* @note To be used where the sizeof operator cannot be used, preprocessor
* expressions for example.
*/
#define SIZEOF_PTR 4
/**
* @brief True if alignment is low-high in current architecture.
*/
#define REVERSE_ORDER 1
#endif /* CHTYPES_H */
/** @} */