]> git.sur5r.net Git - u-boot/blob - arch/arm/include/asm/posix_types.h
arm64: core support
[u-boot] / arch / arm / include / asm / posix_types.h
1 /*
2  *  linux/include/asm-arm/posix_types.h
3  *
4  *  Copyright (C) 1996-1998 Russell King.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  *  Changelog:
11  *   27-06-1996 RMK     Created
12  */
13 #ifndef __ARCH_ARM_POSIX_TYPES_H
14 #define __ARCH_ARM_POSIX_TYPES_H
15
16 #include <config.h>
17
18 /*
19  * This file is generally used by user-level software, so you need to
20  * be a little careful about namespace pollution etc.  Also, we cannot
21  * assume GCC is being used.
22  */
23
24 typedef unsigned short          __kernel_dev_t;
25 typedef unsigned long           __kernel_ino_t;
26 typedef unsigned short          __kernel_mode_t;
27 typedef unsigned short          __kernel_nlink_t;
28 typedef long                    __kernel_off_t;
29 typedef int                     __kernel_pid_t;
30 typedef unsigned short          __kernel_ipc_pid_t;
31 typedef unsigned short          __kernel_uid_t;
32 typedef unsigned short          __kernel_gid_t;
33
34 #ifdef  CONFIG_ARM64
35 typedef unsigned long           __kernel_size_t;
36 typedef long                    __kernel_ssize_t;
37 typedef long                    __kernel_ptrdiff_t;
38 #else   /* CONFIG_ARM64 */
39 typedef unsigned int            __kernel_size_t;
40 typedef int                     __kernel_ssize_t;
41 typedef int                     __kernel_ptrdiff_t;
42 #endif  /* CONFIG_ARM64 */
43
44 typedef long                    __kernel_time_t;
45 typedef long                    __kernel_suseconds_t;
46 typedef long                    __kernel_clock_t;
47 typedef int                     __kernel_daddr_t;
48 typedef char *                  __kernel_caddr_t;
49 typedef unsigned short          __kernel_uid16_t;
50 typedef unsigned short          __kernel_gid16_t;
51 typedef unsigned int            __kernel_uid32_t;
52 typedef unsigned int            __kernel_gid32_t;
53
54 typedef unsigned short          __kernel_old_uid_t;
55 typedef unsigned short          __kernel_old_gid_t;
56
57 #ifdef __GNUC__
58 typedef long long               __kernel_loff_t;
59 #endif
60
61 typedef struct {
62 #if defined(__KERNEL__) || defined(__USE_ALL)
63         int     val[2];
64 #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
65         int     __val[2];
66 #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
67 } __kernel_fsid_t;
68
69 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
70
71 #undef  __FD_SET
72 #define __FD_SET(fd, fdsetp) \
73                 (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
74
75 #undef  __FD_CLR
76 #define __FD_CLR(fd, fdsetp) \
77                 (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
78
79 #undef  __FD_ISSET
80 #define __FD_ISSET(fd, fdsetp) \
81                 ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
82
83 #undef  __FD_ZERO
84 #define __FD_ZERO(fdsetp) \
85                 (memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp)))
86
87 #endif
88
89 #endif