X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fcompat.h;h=e1e78bb971aa5d46da0aaa999476c0b36809f231;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=e45c0f905451ac2f4696dac1010c7f30bcd833ba;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/linux/compat.h b/include/linux/compat.h index e45c0f905..e1e78bb97 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -79,6 +79,8 @@ struct compat_rusage { compat_long_t ru_nivcsw; }; +extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); + struct compat_dirent { u32 d_ino; compat_off_t d_off; @@ -130,5 +132,15 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp, compat_ulong_t __user *exp, struct compat_timeval __user *tvp); +#define BITS_PER_COMPAT_LONG (8*sizeof(compat_long_t)) + +#define BITS_TO_COMPAT_LONGS(bits) \ + (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG) + +long compat_get_bitmap(unsigned long *mask, compat_ulong_t __user *umask, + unsigned long bitmap_size); +long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask, + unsigned long bitmap_size); + #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */