feat(newlib): removed some unecessary IRAM attributes for newlib functions

This commit is contained in:
Marius Vikhammer
2025-03-10 15:31:30 +08:00
parent 87024c3da1
commit 2fc73a05b3
2 changed files with 6 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
* to the streams of the global struct _reent, which are initialized in * to the streams of the global struct _reent, which are initialized in
* startup code. * startup code.
*/ */
void IRAM_ATTR esp_reent_init(struct _reent* r) void esp_reent_init(struct _reent* r)
{ {
memset(r, 0, sizeof(*r)); memset(r, 0, sizeof(*r));
_REENT_STDIN(r) = _REENT_STDIN(_GLOBAL_REENT); _REENT_STDIN(r) = _REENT_STDIN(_GLOBAL_REENT);

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -152,7 +152,7 @@ WEAK_UNLESS_TIMEFUNC_IMPL int adjtime(const struct timeval *delta, struct timeva
#endif #endif
} }
clock_t IRAM_ATTR _times_r(struct _reent *r, struct tms *ptms) clock_t _times_r(struct _reent *r, struct tms *ptms)
{ {
clock_t t = xTaskGetTickCount() * (portTICK_PERIOD_MS * CLK_TCK / 1000); clock_t t = xTaskGetTickCount() * (portTICK_PERIOD_MS * CLK_TCK / 1000);
ptms->tms_cstime = 0; ptms->tms_cstime = 0;
@@ -164,7 +164,7 @@ clock_t IRAM_ATTR _times_r(struct _reent *r, struct tms *ptms)
return (clock_t) tv.tv_sec; return (clock_t) tv.tv_sec;
} }
WEAK_UNLESS_TIMEFUNC_IMPL int IRAM_ATTR _gettimeofday_r(struct _reent *r, struct timeval *tv, void *tz) WEAK_UNLESS_TIMEFUNC_IMPL int _gettimeofday_r(struct _reent *r, struct timeval *tv, void *tz)
{ {
(void) tz; (void) tz;
@@ -174,6 +174,8 @@ WEAK_UNLESS_TIMEFUNC_IMPL int IRAM_ATTR _gettimeofday_r(struct _reent *r, struct
tv->tv_sec = microseconds / 1000000; tv->tv_sec = microseconds / 1000000;
tv->tv_usec = microseconds % 1000000; tv->tv_usec = microseconds % 1000000;
} }
__errno_r(r) = ENOSYS;
return 0; return 0;
#else #else
__errno_r(r) = ENOSYS; __errno_r(r) = ENOSYS;