diff options
| author | Man, Jianting (Meco) <[email protected]> | 2021-12-17 02:34:17 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-17 15:34:17 +0800 |
| commit | 6369e8950273cc3746d47b315549519a9214339c (patch) | |
| tree | f06be6f8264aca9144909a47df0d59939c205425 /components/libc/compilers/common/sys | |
| parent | 417efc370f0db86a1bc16916564658ae41443675 (diff) | |
[posix] POSIX standard implementation for PSE51 (#5384)
* [posix] POSIX standard implementation for PSE51
- add some posix's interfaces that we haven't before.
- these PR have passed the interface definition test across gcc platfrom;
- have tested base on qemu-a9 and stm32h750-art-pi.
* [newlib] only enable POSIX.1-1990
* update projects
Diffstat (limited to 'components/libc/compilers/common/sys')
| -rw-r--r-- | components/libc/compilers/common/sys/time.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index 93e3bb7ba4..a285139649 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -72,6 +72,7 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz); struct tm *gmtime_r(const time_t *timep, struct tm *r); #endif +#ifdef RT_USING_POSIX_CLOCK /* POSIX clock and timer */ #define MILLISECOND_PER_SECOND 1000UL #define MICROSECOND_PER_SECOND 1000000UL @@ -101,7 +102,10 @@ struct tm *gmtime_r(const time_t *timep, struct tm *r); int clock_getres (clockid_t clockid, struct timespec *res); int clock_gettime (clockid_t clockid, struct timespec *tp); int clock_settime (clockid_t clockid, const struct timespec *tp); +int clock_nanosleep(clockid_t clockid, int flags, const struct timespec *rqtp, struct timespec *rmtp); +int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); int rt_timespec_to_tick(const struct timespec *time); +#endif /* RT_USING_POSIX_CLOCK */ /* timezone */ void tz_set(int8_t tz); |
