Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
#ifndef _LINUX_COMPAT_H
2
#define _LINUX_COMPAT_H
3
/*
4
 * These are the type definitions for the architecture specific
5
 * syscall compatibility layer.
6
 */
7
#include <linux/config.h>
8
 
9
#ifdef CONFIG_COMPAT
10
 
11
#include <linux/stat.h>
12
#include <linux/param.h>        /* for HZ */
13
#include <asm/compat.h>
14
 
15
#define compat_jiffies_to_clock_t(x)    \
16
                (((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
17
 
18
struct compat_itimerspec {
19
        struct compat_timespec it_interval;
20
        struct compat_timespec it_value;
21
};
22
 
23
struct compat_utimbuf {
24
        compat_time_t           actime;
25
        compat_time_t           modtime;
26
};
27
 
28
struct compat_itimerval {
29
        struct compat_timeval   it_interval;
30
        struct compat_timeval   it_value;
31
};
32
 
33
struct compat_tms {
34
        compat_clock_t          tms_utime;
35
        compat_clock_t          tms_stime;
36
        compat_clock_t          tms_cutime;
37
        compat_clock_t          tms_cstime;
38
};
39
 
40
#define _COMPAT_NSIG_WORDS      (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
41
 
42
typedef struct {
43
        compat_sigset_word      sig[_COMPAT_NSIG_WORDS];
44
} compat_sigset_t;
45
 
46
extern int cp_compat_stat(struct kstat *, struct compat_stat *);
47
extern int get_compat_timespec(struct timespec *, struct compat_timespec *);
48
extern int put_compat_timespec(struct timespec *, struct compat_timespec *);
49
 
50
struct compat_iovec {
51
        compat_uptr_t   iov_base;
52
        compat_size_t   iov_len;
53
};
54
 
55
struct compat_rlimit {
56
        compat_ulong_t  rlim_cur;
57
        compat_ulong_t  rlim_max;
58
};
59
 
60
struct compat_rusage {
61
        struct compat_timeval ru_utime;
62
        struct compat_timeval ru_stime;
63
        compat_long_t   ru_maxrss;
64
        compat_long_t   ru_ixrss;
65
        compat_long_t   ru_idrss;
66
        compat_long_t   ru_isrss;
67
        compat_long_t   ru_minflt;
68
        compat_long_t   ru_majflt;
69
        compat_long_t   ru_nswap;
70
        compat_long_t   ru_inblock;
71
        compat_long_t   ru_oublock;
72
        compat_long_t   ru_msgsnd;
73
        compat_long_t   ru_msgrcv;
74
        compat_long_t   ru_nsignals;
75
        compat_long_t   ru_nvcsw;
76
        compat_long_t   ru_nivcsw;
77
};
78
 
79
struct compat_statfs64 {
80
        __u32 f_type;
81
        __u32 f_bsize;
82
        __u64 f_blocks;
83
        __u64 f_bfree;
84
        __u64 f_bavail;
85
        __u64 f_files;
86
        __u64 f_ffree;
87
        __kernel_fsid_t f_fsid;
88
        __u32 f_namelen;
89
        __u32 f_frsize;
90
        __u32 f_spare[5];
91
};
92
 
93
struct compat_dirent {
94
        u32             d_ino;
95
        compat_off_t    d_off;
96
        u16             d_reclen;
97
        char            d_name[256];
98
};
99
 
100
#endif /* CONFIG_COMPAT */
101
#endif /* _LINUX_COMPAT_H */