1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2020-09-05 Meco Man fix bugs 9 * 2020-12-16 Meco Man add useconds_t 10 */ 11 12 #ifndef __SYS_TYPES_H__ 13 #define __SYS_TYPES_H__ 14 15 #include <stdint.h> 16 #include <stddef.h> 17 #include <time.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 typedef int32_t clockid_t; 24 typedef int32_t key_t; /* Used for interprocess communication. */ 25 typedef int pid_t; /* Used for process IDs and process group IDs. */ 26 typedef unsigned short uid_t; 27 typedef unsigned short gid_t; 28 typedef signed long off_t; 29 typedef int mode_t; 30 typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ 31 typedef unsigned long __timer_t; 32 typedef __timer_t timer_t; 33 typedef long suseconds_t; /* microseconds. */ 34 typedef unsigned long useconds_t; /* microseconds (unsigned) */ 35 36 typedef unsigned long dev_t; 37 38 typedef unsigned int u_int; 39 typedef unsigned char u_char; 40 typedef unsigned long u_long; 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif 47