4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-07 19:34:34 +08:00

add RTM_EXPORT label for unistd.c

This commit is contained in:
Meco Man 2021-02-12 02:21:30 +08:00
parent e3a32e807c
commit fa8e8ed31f

View File

@ -21,12 +21,14 @@ int isatty(int fd)
struct termios ts; struct termios ts;
return(tcgetattr(fd,&ts) != -1);/*true if no error (is a tty)*/ return(tcgetattr(fd,&ts) != -1);/*true if no error (is a tty)*/
} }
RTM_EXPORT(isatty);
#endif #endif
char *ttyname(int fd) char *ttyname(int fd)
{ {
return "/dev/tty0"; /*TODO: need to add more specific*/ return "/dev/tty0"; /*TODO: need to add more specific*/
} }
RTM_EXPORT(ttyname);
unsigned int sleep(unsigned int seconds) unsigned int sleep(unsigned int seconds)
{ {
@ -38,6 +40,7 @@ unsigned int sleep(unsigned int seconds)
return seconds - delta_tick/RT_TICK_PER_SECOND; return seconds - delta_tick/RT_TICK_PER_SECOND;
} }
RTM_EXPORT(sleep);
int usleep(useconds_t usec) int usleep(useconds_t usec)
{ {
@ -45,3 +48,4 @@ int usleep(useconds_t usec)
rt_hw_us_delay(usec % 1000u); rt_hw_us_delay(usec % 1000u);
return 0; return 0;
} }
RTM_EXPORT(usleep);