types.h 887 字节
Newer Older
1 2 3 4 5 6 7
/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * 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 13 14 15
#ifndef __TYPES_H__
#define __TYPES_H__

#include <stdint.h>

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

#endif