freebsd.hh revision 11383
112952Sgabeblack@google.com/*
212952Sgabeblack@google.com * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
312952Sgabeblack@google.com * All rights reserved.
412952Sgabeblack@google.com *
512952Sgabeblack@google.com * This software was developed by the University of Cambridge Computer
612952Sgabeblack@google.com * Laboratory as part of the CTSRD Project, with support from the UK Higher
712952Sgabeblack@google.com * Education Innovation Fund (HEIF).
812952Sgabeblack@google.com *
912952Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without
1012952Sgabeblack@google.com * modification, are permitted provided that the following conditions are
1112952Sgabeblack@google.com * met: redistributions of source code must retain the above copyright
1212952Sgabeblack@google.com * notice, this list of conditions and the following disclaimer;
1312952Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright
1412952Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the
1512952Sgabeblack@google.com * documentation and/or other materials provided with the distribution;
1612952Sgabeblack@google.com * neither the name of the copyright holders nor the names of its
1712952Sgabeblack@google.com * contributors may be used to endorse or promote products derived from
1812952Sgabeblack@google.com * this software without specific prior written permission.
1912952Sgabeblack@google.com *
2012952Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2112952Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2212952Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2312952Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2412952Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2512952Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2612952Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2712952Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2812952Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2912952Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3012952Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3112952Sgabeblack@google.com */
3212952Sgabeblack@google.com
3312952Sgabeblack@google.com#ifndef __ARCH_ARM_FREEBSD_FREEBSD_HH__
3412997Sgabeblack@google.com#define __ARCH_ARM_FREEBSD_FREEBSD_HH__
3512957Sgabeblack@google.com
3612952Sgabeblack@google.com#include "kern/freebsd/freebsd.hh"
3712952Sgabeblack@google.com
3812957Sgabeblack@google.comclass ArmFreebsd32 : public FreeBSD
3912957Sgabeblack@google.com{
4012953Sgabeblack@google.com  public:
4112952Sgabeblack@google.com
4213063Sgabeblack@google.com    /// This table maps the target open() flags to the corresponding
4312952Sgabeblack@google.com    /// host open() flags.
4412991Sgabeblack@google.com    static SyscallFlagTransTable openFlagTable[];
4512957Sgabeblack@google.com
4612952Sgabeblack@google.com    /// Number of entries in openFlagTable[].
4712957Sgabeblack@google.com    static const int NUM_OPEN_FLAGS;
4812952Sgabeblack@google.com
4912997Sgabeblack@google.com    //@{
5012952Sgabeblack@google.com    /// Basic ARM FreeBSD types
5112952Sgabeblack@google.com    typedef uint32_t size_t;
5212952Sgabeblack@google.com    typedef uint32_t off_t;
5312952Sgabeblack@google.com    typedef int32_t time_t;
5412957Sgabeblack@google.com    typedef int32_t clock_t;
5512957Sgabeblack@google.com    //@}
5612957Sgabeblack@google.com
5712957Sgabeblack@google.com    //@{
5812957Sgabeblack@google.com    /// open(2) flag values.
5912957Sgabeblack@google.com    static const int TGT_O_RDONLY    = 0x00000000; //!< O_RDONLY
6012957Sgabeblack@google.com    static const int TGT_O_WRONLY    = 0x00000001; //!< O_WRONLY
6112957Sgabeblack@google.com    static const int TGT_O_RDWR      = 0x00000002; //!< O_RDWR
6212957Sgabeblack@google.com    static const int TGT_O_CREAT     = 0x00000200; //!< O_CREAT
6312959Sgabeblack@google.com    static const int TGT_O_EXCL      = 0x00000800; //!< O_EXCL
6412957Sgabeblack@google.com    static const int TGT_O_NOCTTY    = 0x00008000; //!< O_NOCTTY
6512957Sgabeblack@google.com    static const int TGT_O_TRUNC     = 0x00000400; //!< O_TRUNC
6612957Sgabeblack@google.com    static const int TGT_O_APPEND    = 0x00000008; //!< O_APPEND
6712957Sgabeblack@google.com    static const int TGT_O_NONBLOCK  = 0x00000004; //!< O_NONBLOCK
6812957Sgabeblack@google.com    static const int TGT_O_SYNC      = 0x00000080; //!< O_SYNC
6912957Sgabeblack@google.com    static const int TGT_FASYNC      = 0x00000040; //!< FASYNC
7012957Sgabeblack@google.com    static const int TGT_O_DIRECT    = 0x00010000; //!< O_DIRECT
7112957Sgabeblack@google.com    static const int TGT_O_DIRECTORY = 0x00020000; //!< O_DIRECTORY
7212957Sgabeblack@google.com    static const int TGT_O_NOFOLLOW  = 0x00000100; //!< O_NOFOLLOW
7312962Sgabeblack@google.com    static const int TGT_O_CLOEXEC   = 0x00100000; //!< O_CLOEXEC
7413063Sgabeblack@google.com    //@}
7512957Sgabeblack@google.com
7612957Sgabeblack@google.com    /// For mmap().
7712957Sgabeblack@google.com    static const unsigned TGT_MAP_SHARED    = 0x0001;
7812957Sgabeblack@google.com    static const unsigned TGT_MAP_PRIVATE   = 0x0002;
7912957Sgabeblack@google.com    static const unsigned TGT_MAP_ANONYMOUS = 0x1000;
8012957Sgabeblack@google.com    static const unsigned TGT_MAP_FIXED     = 0x0010;
8112957Sgabeblack@google.com
8212957Sgabeblack@google.com    /// Limit struct for getrlimit/setrlimit.
8312957Sgabeblack@google.com    struct rlimit {
8412957Sgabeblack@google.com        uint32_t  rlim_cur;     //!< soft limit
8512957Sgabeblack@google.com        uint32_t  rlim_max;     //!< hard limit
8612957Sgabeblack@google.com    };
8712957Sgabeblack@google.com
8812957Sgabeblack@google.com    /// For gettimeofday().
8912957Sgabeblack@google.com    struct timeval {
9012957Sgabeblack@google.com        int32_t tv_sec;         //!< seconds
9112957Sgabeblack@google.com        int32_t tv_usec;        //!< microseconds
9212957Sgabeblack@google.com    };
9312957Sgabeblack@google.com
9412957Sgabeblack@google.com    // For writev/readv
9512957Sgabeblack@google.com    struct tgt_iovec {
9612957Sgabeblack@google.com        uint32_t iov_base; // void *
9712957Sgabeblack@google.com        uint32_t iov_len;
9812957Sgabeblack@google.com    };
9912957Sgabeblack@google.com
10012957Sgabeblack@google.com    /*
10112957Sgabeblack@google.com     * sizeof st 120
10212957Sgabeblack@google.com     * sizeof st_dev 4
10312957Sgabeblack@google.com     * sizeof st_ino 4
10412957Sgabeblack@google.com     * sizeof st_mode 2
10512962Sgabeblack@google.com     * sizeof st_nlink 2
10612957Sgabeblack@google.com     * sizeof st_uid 4
10712957Sgabeblack@google.com     * sizeof st_gid 4
10812957Sgabeblack@google.com     * sizeof st_rdev 4
10912957Sgabeblack@google.com     * sizeof st_atim 16
11012957Sgabeblack@google.com     * sizeof st_size 8
11112957Sgabeblack@google.com     * sizeof st_blocks 8
11212957Sgabeblack@google.com     * sizeof st_blksize 4
11312957Sgabeblack@google.com     * sizeof st_flags 4
11412957Sgabeblack@google.com     * sizeof st_gen 4
11512957Sgabeblack@google.com     * sizeof st_lspare 4
11612957Sgabeblack@google.com     */
11712957Sgabeblack@google.com
11812957Sgabeblack@google.com    typedef struct {
11912957Sgabeblack@google.com        uint32_t   st_dev;
12012957Sgabeblack@google.com        uint32_t   st_ino;
12112957Sgabeblack@google.com        uint16_t   st_mode;
12212957Sgabeblack@google.com        uint16_t   st_nlink;
12312957Sgabeblack@google.com        uint32_t   st_uid;
12412957Sgabeblack@google.com        uint32_t   st_gid;
12512957Sgabeblack@google.com        uint32_t   st_rdev;
12612957Sgabeblack@google.com        uint64_t   st_atimeX;
12712957Sgabeblack@google.com        uint64_t   st_atime_nsec;
12812957Sgabeblack@google.com        uint64_t   st_mtimeX;
12912957Sgabeblack@google.com        uint64_t   st_mtime_nsec;
13012957Sgabeblack@google.com        uint64_t   st_ctimeX;
13112957Sgabeblack@google.com        uint64_t   st_ctime_nsec;
13212957Sgabeblack@google.com        uint64_t   st_size;
13312957Sgabeblack@google.com        uint64_t   st_blocks;
13412957Sgabeblack@google.com        uint32_t   st_blksize;
13512957Sgabeblack@google.com        uint32_t   st_flags;
13612957Sgabeblack@google.com        uint32_t   st_gen;
13712957Sgabeblack@google.com        uint32_t   st_lspare;
13812957Sgabeblack@google.com        uint64_t   st_birthtimX;
13912957Sgabeblack@google.com        uint64_t   st_birthtim;
14012957Sgabeblack@google.com    } tgt_stat;
14113075Sgabeblack@google.com
14213075Sgabeblack@google.com    typedef struct {
14312957Sgabeblack@google.com        uint32_t   st_dev;
14412957Sgabeblack@google.com        uint32_t   st_ino;
14512957Sgabeblack@google.com        uint16_t   st_mode;
14612957Sgabeblack@google.com        uint16_t   st_nlink;
14712957Sgabeblack@google.com        uint32_t   st_uid;
14812957Sgabeblack@google.com        uint32_t   st_gid;
14912957Sgabeblack@google.com        uint32_t   st_rdev;
15012957Sgabeblack@google.com        uint64_t   st_atimeX;
15112957Sgabeblack@google.com        uint64_t   st_atime_nsec;
15212957Sgabeblack@google.com        uint64_t   st_mtimeX;
15312957Sgabeblack@google.com        uint64_t   st_mtime_nsec;
15412957Sgabeblack@google.com        uint64_t   st_ctimeX;
15512957Sgabeblack@google.com        uint64_t   st_ctime_nsec;
15612957Sgabeblack@google.com        uint64_t   st_size;
15712957Sgabeblack@google.com        uint64_t   st_blocks;
15812957Sgabeblack@google.com        uint32_t   st_blksize;
15912957Sgabeblack@google.com        uint32_t   st_flags;
16012957Sgabeblack@google.com        uint32_t   st_gen;
16112957Sgabeblack@google.com        uint32_t   st_lspare;
16212957Sgabeblack@google.com        uint64_t   st_birthtimX;
16312957Sgabeblack@google.com        uint64_t   st_birthtim;
16412957Sgabeblack@google.com    } tgt_stat64;
16512957Sgabeblack@google.com
16612957Sgabeblack@google.com    /// For getrusage().
16712957Sgabeblack@google.com    struct rusage {
16812957Sgabeblack@google.com        struct timeval ru_utime;        //!< user time used
16912957Sgabeblack@google.com        struct timeval ru_stime;        //!< system time used
17012957Sgabeblack@google.com        int32_t ru_maxrss;              //!< max rss
17112957Sgabeblack@google.com        int32_t ru_ixrss;               //!< integral shared memory size
17212957Sgabeblack@google.com        int32_t ru_idrss;               //!< integral unshared data "
17312957Sgabeblack@google.com        int32_t ru_isrss;               //!< integral unshared stack "
17412957Sgabeblack@google.com        int32_t ru_minflt;              //!< page reclaims - total vmfaults
17512957Sgabeblack@google.com        int32_t ru_majflt;              //!< page faults
17612957Sgabeblack@google.com        int32_t ru_nswap;               //!< swaps
17712957Sgabeblack@google.com        int32_t ru_inblock;             //!< block input operations
17812957Sgabeblack@google.com        int32_t ru_oublock;             //!< block output operations
17912957Sgabeblack@google.com        int32_t ru_msgsnd;              //!< messages sent
18012957Sgabeblack@google.com        int32_t ru_msgrcv;              //!< messages received
18112957Sgabeblack@google.com        int32_t ru_nsignals;            //!< signals received
18212957Sgabeblack@google.com        int32_t ru_nvcsw;               //!< voluntary context switches
18312957Sgabeblack@google.com        int32_t ru_nivcsw;              //!< involuntary "
18412957Sgabeblack@google.com    };
18512957Sgabeblack@google.com
18612957Sgabeblack@google.com    /// For times().
18712957Sgabeblack@google.com    struct tms {
18812957Sgabeblack@google.com        int32_t tms_utime;      //!< user time
18912957Sgabeblack@google.com        int32_t tms_stime;      //!< system time
19012957Sgabeblack@google.com        int32_t tms_cutime;     //!< user time of children
19112957Sgabeblack@google.com        int32_t tms_cstime;     //!< system time of children
19212957Sgabeblack@google.com    };
19312957Sgabeblack@google.com};
19412957Sgabeblack@google.com
19512957Sgabeblack@google.comclass ArmFreebsd64 : public FreeBSD
19612957Sgabeblack@google.com{
19712957Sgabeblack@google.com  public:
19812957Sgabeblack@google.com
19912957Sgabeblack@google.com    /// This table maps the target open() flags to the corresponding
20012957Sgabeblack@google.com    /// host open() flags.
20112957Sgabeblack@google.com    static SyscallFlagTransTable openFlagTable[];
20212957Sgabeblack@google.com
20312957Sgabeblack@google.com    /// Number of entries in openFlagTable[].
20412957Sgabeblack@google.com    static const int NUM_OPEN_FLAGS;
20512957Sgabeblack@google.com
20612957Sgabeblack@google.com    //@{
20712957Sgabeblack@google.com    /// Basic ARM FreeBSD types
20812957Sgabeblack@google.com    typedef uint64_t size_t;
20912957Sgabeblack@google.com    typedef uint64_t off_t;
21012957Sgabeblack@google.com    typedef int64_t time_t;
21112957Sgabeblack@google.com    typedef int64_t clock_t;
21212957Sgabeblack@google.com    //@}
21312957Sgabeblack@google.com
21412957Sgabeblack@google.com    //@{
21512957Sgabeblack@google.com    /// open(2) flag values.
21612957Sgabeblack@google.com    static const int TGT_O_RDONLY    = 0x00000000; //!< O_RDONLY
21712957Sgabeblack@google.com    static const int TGT_O_WRONLY    = 0x00000001; //!< O_WRONLY
21812957Sgabeblack@google.com    static const int TGT_O_RDWR      = 0x00000002; //!< O_RDWR
21912957Sgabeblack@google.com    static const int TGT_O_CREAT     = 0x00000200; //!< O_CREAT
22012957Sgabeblack@google.com    static const int TGT_O_EXCL      = 0x00000800; //!< O_EXCL
22112957Sgabeblack@google.com    static const int TGT_O_NOCTTY    = 0x00008000; //!< O_NOCTTY
22212957Sgabeblack@google.com    static const int TGT_O_TRUNC     = 0x00000400; //!< O_TRUNC
22312957Sgabeblack@google.com    static const int TGT_O_APPEND    = 0x00000008; //!< O_APPEND
22412957Sgabeblack@google.com    static const int TGT_O_NONBLOCK  = 0x00000004; //!< O_NONBLOCK
22513053Sgabeblack@google.com    static const int TGT_O_SYNC      = 0x00000080; //!< O_SYNC
22612957Sgabeblack@google.com    static const int TGT_FASYNC      = 0x00000040; //!< FASYNC
22712957Sgabeblack@google.com    static const int TGT_O_DIRECT    = 0x00010000; //!< O_DIRECT
22812957Sgabeblack@google.com    static const int TGT_O_DIRECTORY = 0x00020000; //!< O_DIRECTORY
22912957Sgabeblack@google.com    static const int TGT_O_NOFOLLOW  = 0x00000100; //!< O_NOFOLLOW
23012957Sgabeblack@google.com    static const int TGT_O_CLOEXEC   = 0x00100000; //!< O_CLOEXEC
23112991Sgabeblack@google.com    //@}
23212991Sgabeblack@google.com
23312991Sgabeblack@google.com    /// For mmap().
23412991Sgabeblack@google.com    static const unsigned TGT_MAP_SHARED    = 0x0001;
23512991Sgabeblack@google.com    static const unsigned TGT_MAP_PRIVATE   = 0x0002;
23612991Sgabeblack@google.com    static const unsigned TGT_MAP_ANONYMOUS = 0x1000;
23712991Sgabeblack@google.com    static const unsigned TGT_MAP_FIXED     = 0x0010;
23812991Sgabeblack@google.com
23912991Sgabeblack@google.com    //@{
24012991Sgabeblack@google.com    /// For getrusage().
24112991Sgabeblack@google.com    static const int TGT_RUSAGE_SELF = 0;
24212991Sgabeblack@google.com    static const int TGT_RUSAGE_CHILDREN = -1;
24312991Sgabeblack@google.com    static const int TGT_RUSAGE_THREAD = 1;
24412991Sgabeblack@google.com    //@}
24512991Sgabeblack@google.com
24612991Sgabeblack@google.com    /// Resource enumeration for getrlimit().
24712991Sgabeblack@google.com    enum rlimit_resources {
24812991Sgabeblack@google.com        TGT_RLIMIT_CPU = 0,
24912957Sgabeblack@google.com        TGT_RLIMIT_FSIZE = 1,
25012957Sgabeblack@google.com        TGT_RLIMIT_DATA = 2,
25112957Sgabeblack@google.com        TGT_RLIMIT_STACK = 3,
25212957Sgabeblack@google.com        TGT_RLIMIT_CORE = 4,
25312957Sgabeblack@google.com        TGT_RLIMIT_RSS = 5,
25412957Sgabeblack@google.com        TGT_RLIMIT_MEMLOCK = 6,
25512957Sgabeblack@google.com        TGT_RLIMIT_NPROC = 7,
25612957Sgabeblack@google.com        TGT_RLIMIT_NOFILE = 8,
25712957Sgabeblack@google.com        TGT_RLIMIT_SBSIZE = 9,
25812957Sgabeblack@google.com        TGT_RLIMIT_VMEM = 10,
25912957Sgabeblack@google.com        TGT_RLIMIT_AS = TGT_RLIMIT_VMEM,
26012957Sgabeblack@google.com        TGT_RLIMIT_NPTS = 11,
26112957Sgabeblack@google.com        TGT_RLIMIT_SWAP = 12,
26212957Sgabeblack@google.com        TGT_RLIMIT_KQUEUES = 13
26312957Sgabeblack@google.com    };
26412957Sgabeblack@google.com
26512957Sgabeblack@google.com    /// Limit struct for getrlimit/setrlimit.
26612957Sgabeblack@google.com    struct rlimit {
26712957Sgabeblack@google.com        uint64_t  rlim_cur;     //!< soft limit
26812957Sgabeblack@google.com        uint64_t  rlim_max;     //!< hard limit
26913087Sgabeblack@google.com    };
27012952Sgabeblack@google.com
27112952Sgabeblack@google.com    /// For gettimeofday().
27212952Sgabeblack@google.com    struct timeval {
27312961Sgabeblack@google.com        int64_t tv_sec;         //!< seconds
27412952Sgabeblack@google.com        int64_t tv_usec;        //!< microseconds
27512952Sgabeblack@google.com    };
27612997Sgabeblack@google.com
27712952Sgabeblack@google.com    // For writev/readv
27812952Sgabeblack@google.com    struct tgt_iovec {
27912952Sgabeblack@google.com        uint64_t iov_base; // void *
28012952Sgabeblack@google.com        uint64_t iov_len;
28112952Sgabeblack@google.com    };
28212952Sgabeblack@google.com
28312952Sgabeblack@google.com    typedef struct {
28412952Sgabeblack@google.com        uint32_t   st_dev;
28512952Sgabeblack@google.com        uint32_t   st_ino;
28612952Sgabeblack@google.com        uint16_t   st_mode;
28712952Sgabeblack@google.com        uint16_t   st_nlink;
28812952Sgabeblack@google.com        uint32_t   st_uid;
28912952Sgabeblack@google.com        uint32_t   st_gid;
29012952Sgabeblack@google.com        uint32_t   st_rdev;
29112952Sgabeblack@google.com        uint64_t   st_atimeX;
29212952Sgabeblack@google.com        uint64_t   st_atime_nsec;
29312952Sgabeblack@google.com        uint64_t   st_mtimeX;
29412952Sgabeblack@google.com        uint64_t   st_mtime_nsec;
29512952Sgabeblack@google.com        uint64_t   st_ctimeX;
29612952Sgabeblack@google.com        uint64_t   st_ctime_nsec;
29712952Sgabeblack@google.com        uint64_t   st_size;
29812952Sgabeblack@google.com        uint64_t   st_blocks;
29912952Sgabeblack@google.com        uint32_t   st_blksize;
30012952Sgabeblack@google.com        uint32_t   st_flags;
30112952Sgabeblack@google.com        uint32_t   st_gen;
30212952Sgabeblack@google.com        uint32_t   st_lspare;
30312952Sgabeblack@google.com        uint64_t   st_birthtimX;
30412952Sgabeblack@google.com        uint64_t   st_birthtim;
30512953Sgabeblack@google.com    } tgt_stat;
30612957Sgabeblack@google.com
30712953Sgabeblack@google.com    typedef struct {
30812953Sgabeblack@google.com        uint32_t   st_dev;
30912953Sgabeblack@google.com        uint32_t   st_ino;
31012957Sgabeblack@google.com        uint16_t   st_mode;
31112957Sgabeblack@google.com        uint16_t   st_nlink;
31212953Sgabeblack@google.com        uint32_t   st_uid;
31312953Sgabeblack@google.com        uint32_t   st_gid;
31412957Sgabeblack@google.com        uint32_t   st_rdev;
31512957Sgabeblack@google.com        uint64_t   st_atimeX;
31612957Sgabeblack@google.com        uint64_t   st_atime_nsec;
31712959Sgabeblack@google.com        uint64_t   st_mtimeX;
31812959Sgabeblack@google.com        uint64_t   st_mtime_nsec;
31912959Sgabeblack@google.com        uint64_t   st_ctimeX;
32012959Sgabeblack@google.com        uint64_t   st_ctime_nsec;
32112953Sgabeblack@google.com        uint64_t   st_size;
32212953Sgabeblack@google.com        uint64_t   st_blocks;
32312953Sgabeblack@google.com        uint32_t   st_blksize;
32412953Sgabeblack@google.com        uint32_t   st_flags;
32512997Sgabeblack@google.com        uint32_t   st_gen;
32612997Sgabeblack@google.com        uint32_t   st_lspare;
32712997Sgabeblack@google.com        uint64_t   st_birthtimX;
32812952Sgabeblack@google.com        uint64_t   st_birthtim;
32912998Sgabeblack@google.com    } tgt_stat64;
33012953Sgabeblack@google.com
33112953Sgabeblack@google.com    /// For getrusage().
33212952Sgabeblack@google.com    struct rusage {
33312957Sgabeblack@google.com        struct timeval ru_utime;        //!< user time used
33412957Sgabeblack@google.com        struct timeval ru_stime;        //!< system time used
33513072Sgabeblack@google.com        int64_t ru_maxrss;              //!< max rss
33612957Sgabeblack@google.com        int64_t ru_ixrss;               //!< integral shared memory size
33712957Sgabeblack@google.com        int64_t ru_idrss;               //!< integral unshared data "
33812957Sgabeblack@google.com        int64_t ru_isrss;               //!< integral unshared stack "
33912957Sgabeblack@google.com        int64_t ru_minflt;              //!< page reclaims - total vmfaults
34012952Sgabeblack@google.com        int64_t ru_majflt;              //!< page faults
34112952Sgabeblack@google.com        int64_t ru_nswap;               //!< swaps
34212952Sgabeblack@google.com        int64_t ru_inblock;             //!< block input operations
34312952Sgabeblack@google.com        int64_t ru_oublock;             //!< block output operations
34412952Sgabeblack@google.com        int64_t ru_msgsnd;              //!< messages sent
34512952Sgabeblack@google.com        int64_t ru_msgrcv;              //!< messages received
34612961Sgabeblack@google.com        int64_t ru_nsignals;            //!< signals received
34712952Sgabeblack@google.com        int64_t ru_nvcsw;               //!< voluntary context switches
34812952Sgabeblack@google.com        int64_t ru_nivcsw;              //!< involuntary "
34912952Sgabeblack@google.com    };
35012952Sgabeblack@google.com
35112998Sgabeblack@google.com    /// For times().
35212998Sgabeblack@google.com    struct tms {
35312952Sgabeblack@google.com        int64_t tms_utime;      //!< user time
35412959Sgabeblack@google.com        int64_t tms_stime;      //!< system time
35512952Sgabeblack@google.com        int64_t tms_cutime;     //!< user time of children
35612952Sgabeblack@google.com        int64_t tms_cstime;     //!< system time of children
35712952Sgabeblack@google.com    };
35812952Sgabeblack@google.com};
35912952Sgabeblack@google.com
36012952Sgabeblack@google.com#endif
36112953Sgabeblack@google.com