From 11cd58036049518f66c53567ec167f5f83d84e3a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 24 Apr 2017 16:48:14 +0000 Subject: Added a note to sleep functions because use of unsafe time conversion macros internally. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10170 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chthreads.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'os/rt/include') diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h index 0fd206d19..6ac40d3b8 100644 --- a/os/rt/include/chthreads.h +++ b/os/rt/include/chthreads.h @@ -182,6 +182,9 @@ typedef struct { * @note The specified time is rounded up to a value allowed by the real * system tick clock. * @note The maximum specifiable value is implementation dependent. + * @note Use of this macro for large values is not secure because + * integer overflows, make sure your value can be correctly + * converted. * * @param[in] sec time in seconds, must be different from zero * @@ -195,6 +198,9 @@ typedef struct { * @note The specified time is rounded up to a value allowed by the real * system tick clock. * @note The maximum specifiable value is implementation dependent. + * @note Use of this macro for large values is not secure because + * integer overflows, make sure your value can be correctly + * converted. * * @param[in] msec time in milliseconds, must be different from zero * @@ -208,6 +214,9 @@ typedef struct { * @note The specified time is rounded up to a value allowed by the real * system tick clock. * @note The maximum specifiable value is implementation dependent. + * @note Use of this macro for large values is not secure because + * integer overflows, make sure your value can be correctly + * converted. * * @param[in] usec time in microseconds, must be different from zero * -- cgit v1.2.3