~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/arch/nds32/include/asm/posix_types.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

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