1#ifndef __ARCH_I386_POSIX_TYPES_H
2#define __ARCH_I386_POSIX_TYPES_H
3
4
5
6
7
8
9
10typedef unsigned short __kernel_dev_t;
11typedef unsigned long __kernel_ino_t;
12typedef unsigned short __kernel_mode_t;
13typedef unsigned short __kernel_nlink_t;
14typedef long __kernel_off_t;
15typedef int __kernel_pid_t;
16typedef unsigned short __kernel_ipc_pid_t;
17typedef unsigned short __kernel_uid_t;
18typedef unsigned short __kernel_gid_t;
19
20#if defined(__x86_64__)
21typedef unsigned long __kernel_size_t;
22typedef long __kernel_ssize_t;
23#else
24typedef unsigned int __kernel_size_t;
25typedef int __kernel_ssize_t;
26#endif
27typedef int __kernel_ptrdiff_t;
28typedef long __kernel_time_t;
29typedef long __kernel_suseconds_t;
30typedef long __kernel_clock_t;
31typedef int __kernel_daddr_t;
32typedef char * __kernel_caddr_t;
33typedef unsigned short __kernel_uid16_t;
34typedef unsigned short __kernel_gid16_t;
35typedef unsigned int __kernel_uid32_t;
36typedef unsigned int __kernel_gid32_t;
37
38typedef unsigned short __kernel_old_uid_t;
39typedef unsigned short __kernel_old_gid_t;
40
41#ifdef __GNUC__
42typedef long long __kernel_loff_t;
43#endif
44
45typedef struct {
46#if defined(__KERNEL__) || defined(__USE_ALL)
47 int val[2];
48#else
49 int __val[2];
50#endif
51} __kernel_fsid_t;
52
53#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
54
55#undef __FD_SET
56#define __FD_SET(fd,fdsetp) \
57 __asm__ __volatile__("btsl %1,%0": \
58 "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
59
60#undef __FD_CLR
61#define __FD_CLR(fd,fdsetp) \
62 __asm__ __volatile__("btrl %1,%0": \
63 "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
64
65#undef __FD_ISSET
66#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
67 unsigned char __result; \
68 __asm__ __volatile__("btl %1,%2 ; setb %0" \
69 :"=q" (__result) :"r" ((int) (fd)), \
70 "m" (*(__kernel_fd_set *) (fdsetp))); \
71 __result; }))
72
73#undef __FD_ZERO
74#define __FD_ZERO(fdsetp) \
75do { \
76 int __d0, __d1; \
77 __asm__ __volatile__("cld ; rep ; stosl" \
78 :"=m" (*(__kernel_fd_set *) (fdsetp)), \
79 "=&c" (__d0), "=&D" (__d1) \
80 :"a" (0), "1" (__FDSET_LONGS), \
81 "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \
82} while (0)
83
84#endif
85
86#endif
87