diff options
| author | mysterywolf <[email protected]> | 2020-12-16 15:25:08 +0800 |
|---|---|---|
| committer | mysterywolf <[email protected]> | 2020-12-16 15:25:08 +0800 |
| commit | 702103a2037c7958f20b668aa138e4975a802c02 (patch) | |
| tree | c7ed5741c5a08cb30bef3e4e4bc473de0efeae0a /components/libc/compilers/armlibc | |
| parent | 504112694d225902ef4cdc18bf4c13ccc700e6f8 (diff) | |
prepare for usleep
Diffstat (limited to 'components/libc/compilers/armlibc')
| -rw-r--r-- | components/libc/compilers/armlibc/sys/types.h | 14 | ||||
| -rw-r--r-- | components/libc/compilers/armlibc/sys/unistd.h | 5 |
2 files changed, 12 insertions, 7 deletions
diff --git a/components/libc/compilers/armlibc/sys/types.h b/components/libc/compilers/armlibc/sys/types.h index 2aad77c99d..78fee1bb99 100644 --- a/components/libc/compilers/armlibc/sys/types.h +++ b/components/libc/compilers/armlibc/sys/types.h @@ -5,20 +5,22 @@ * * Change Logs: * Date Author Notes - * 2020-09-05 Meco Man fix bugs + * 2020-09-05 Meco Man fix bugs + * 2020-12-16 Meco Man add useconds_t */ #ifndef __TYPES_H__ #define __TYPES_H__ #include <stdint.h> -typedef int32_t clockid_t; -typedef int32_t key_t; /* Used for interprocess communication. */ -typedef int32_t pid_t; /* Used for process IDs and process group IDs. */ +typedef int32_t clockid_t; +typedef int32_t key_t; /* Used for interprocess communication. */ +typedef int32_t pid_t; /* Used for process IDs and process group IDs. */ #ifndef ARCH_CPU_64BIT -typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ +typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ #else -typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ +typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ #endif +typedef unsigned long useconds_t; /* microseconds (unsigned) */ #endif diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h index 549771e8f4..73a73a267e 100644 --- a/components/libc/compilers/armlibc/sys/unistd.h +++ b/components/libc/compilers/armlibc/sys/unistd.h @@ -5,11 +5,13 @@ * * Change Logs: * Date Author Notes + * 2020-12-16 Meco Man add usleep */ #ifndef _SYS_UNISTD_H #define _SYS_UNISTD_H -#include <rtthread.h> +#include <rtconfig.h> +#include "types.h" #ifdef RT_USING_DFS @@ -69,5 +71,6 @@ int isatty (int fd); char * ttyname (int desc); unsigned int sleep(unsigned int seconds); +int usleep(useconds_t usec); #endif /* _SYS_UNISTD_H */ |
