1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #18212 from benpicco/kernel_defines-CONST

core/kernel_defines: drop CONST definition
This commit is contained in:
Gunar Schorcht 2022-06-17 17:45:46 +02:00 committed by GitHub
commit 934c65fb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 16 deletions

View File

@ -84,18 +84,6 @@ extern "C" {
#define NORETURN
#endif
/**
* @def CONST
* @brief A function declared as *CONST* is #PURE and also not allowed to
* examine global memory. I.e. a *CONST* function cannot even
* dereference a pointer parameter.
*/
#ifdef __GNUC__
#define CONST __attribute__((const))
#else
#define CONST
#endif
/**
* @def PURE
* @brief The function has no effects except the return value and its return

View File

@ -65,7 +65,7 @@ extern const int16_t TM_MON_DAYS_ACCU[12];
* @param[in] year The year. Probably should be 1582, but needs to be 1.
* @returns `1` if it is a leap year, `0` if it is a common year.
*/
int tm_is_leap_year(unsigned year) CONST;
int tm_is_leap_year(unsigned year);
/**
* @brief Returns the congruent weekday of the Doomsday (March 0).
@ -73,7 +73,7 @@ int tm_is_leap_year(unsigned year) CONST;
* @param[in] year The year. Probably should be 1582, but needs to be 1.
* @returns The result `% 7` is the weekday of the Doomsday of the given year.
*/
int tm_doomsday(int year) CONST;
int tm_doomsday(int year);
/**
* @brief Calculates the day of the year and the weekday of a given date.
@ -107,7 +107,7 @@ void tm_fill_derived_values(struct tm *tm);
* @param[in] mday The day in the month.
* @returns 0 if the date is invalid.
*/
int tm_is_valid_date(int year, int mon, int mday) CONST;
int tm_is_valid_date(int year, int mon, int mday);
/**
* @brief Shallow test if a time is valid.
@ -117,7 +117,7 @@ int tm_is_valid_date(int year, int mon, int mday) CONST;
* @param[in] sec The seconds.
* @returns 0 if the time is invalid.
*/
int tm_is_valid_time(int hour, int min, int sec) CONST;
int tm_is_valid_time(int hour, int min, int sec);
#ifdef __cplusplus
}