types.h 1.1 KB
Newer Older
1
/*
2
 * Copyright (c) 2006-2021, RT-Thread Development Team
3 4 5 6 7
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
mysterywolf's avatar
mysterywolf 已提交
8 9
 * 2020-09-05     Meco Man     fix bugs
 * 2020-12-16     Meco Man     add useconds_t
10
 */
11 12
#ifndef __SYS_TYPES_H__
#define __SYS_TYPES_H__
13 14

#include <stdint.h>
15
#include <stddef.h>
16
#include <time.h>
17

mysterywolf's avatar
mysterywolf 已提交
18 19
typedef int32_t          clockid_t;
typedef int32_t          key_t;         /* Used for interprocess communication. */
mysterywolf's avatar
mysterywolf 已提交
20 21 22
typedef int              pid_t;         /* Used for process IDs and process group IDs. */
typedef unsigned short   uid_t;
typedef unsigned short   gid_t;
23 24
typedef signed long      off_t;
typedef int              mode_t;
lymzzyh's avatar
lymzzyh 已提交
25
#ifndef ARCH_CPU_64BIT
mysterywolf's avatar
mysterywolf 已提交
26
typedef signed int       ssize_t;       /* Used for a count of bytes or an error indication. */
lymzzyh's avatar
lymzzyh 已提交
27
#else
mysterywolf's avatar
mysterywolf 已提交
28
typedef long signed int  ssize_t;       /* Used for a count of bytes or an error indication. */
lymzzyh's avatar
lymzzyh 已提交
29
#endif
mysterywolf's avatar
mysterywolf 已提交
30
typedef unsigned long    useconds_t;    /* microseconds (unsigned) */
31

mysterywolf's avatar
mysterywolf 已提交
32 33 34 35 36 37
typedef unsigned long    dev_t;

typedef unsigned int     u_int;
typedef unsigned char    u_char;
typedef unsigned long    u_long;

38
#endif