diff options
| author | 2013-10-25 04:51:38 +0000 | |
|---|---|---|
| committer | 2013-10-25 04:51:38 +0000 | |
| commit | 086a9a62da816c7a4a5ad1ce34e32ee5963280f5 (patch) | |
| tree | df3f53e1f9847ab9e9c25fc5d590f7df6dde817e /sys/compat/linux/linux_misc.h | |
| parent | Move the declarations for dogetrusage(), itimerround(), and dowait4() (diff) | |
| download | wireguard-openbsd-086a9a62da816c7a4a5ad1ce34e32ee5963280f5.tar.xz wireguard-openbsd-086a9a62da816c7a4a5ad1ce34e32ee5963280f5.zip | |
Start to deal with the time_t change's effect on compat/linux:
- add Linux versions of struct rusage, timeval, and itimerval and
conversion functions for them
- add Linux versions of getrusage(), gettimeofday(), {set,get}itimer(),
and nanosleep()
- fix various inconsistencies in naming of Linux versions of types
and conversion functions
- add mappings for LINUX_CLOCK_{PROCESS,THREAD}_CPUTIME_ID to the
native versions
Originally written months ago as part of the time_t work; long
memory, prodding, and ok from pirofti@
Diffstat (limited to 'sys/compat/linux/linux_misc.h')
| -rw-r--r-- | sys/compat/linux/linux_misc.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index a556cba3159..c4e5924d4c8 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.h,v 1.6 2011/12/14 08:33:18 robert Exp $ */ +/* $OpenBSD: linux_misc.h,v 1.7 2013/10/25 04:51:39 guenther Exp $ */ /* $NetBSD: linux_misc.h,v 1.3 1999/05/13 00:31:57 thorpej Exp $ */ /*- @@ -64,6 +64,26 @@ struct linux_sysinfo { char _f[20-2*sizeof(long)-sizeof(int)]; }; +struct linux_rusage { + struct linux_timeval ru_utime; /* user time used */ + struct linux_timeval ru_stime; /* system time used */ + long ru_maxrss; /* max resident set size */ + long ru_ixrss; /* integral shared text memory size */ + long ru_idrss; /* integral unshared data " */ + long ru_isrss; /* integral unshared stack " */ + long ru_minflt; /* page reclaims */ + long ru_majflt; /* page faults */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ +}; + + /* * Options passed to the Linux wait4() system call. */ @@ -71,12 +91,4 @@ struct linux_sysinfo { #define LINUX_WAIT4_WUNTRACED 0x00000002 #define LINUX_WAIT4_WCLONE 0x80000000 -#ifdef _KERNEL -__BEGIN_DECLS -void bsd_to_linux_wstat(int *); -int linux_select1(struct proc *, register_t *, int, fd_set *, fd_set *, - fd_set *, struct timeval *); -__END_DECLS -#endif /* !_KERNEL */ - #endif /* !_LINUX_MISC_H_ */ |
