gem5  v20.1.0.0
linux.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2009 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef __LINUX_HH__
30 #define __LINUX_HH__
31 
32 #include <string>
33 
34 #include "base/random.hh"
35 #include "base/types.hh"
36 #include "kern/operatingsystem.hh"
37 #include "sim/process.hh"
38 
39 class ThreadContext;
40 
46 class Linux : public OperatingSystem
47 {
48 
49  public:
50 
52  typedef uint64_t size_t;
54  typedef uint64_t off_t;
55  typedef int64_t time_t;
56  typedef int64_t clock_t;
57  typedef uint32_t uid_t;
58  typedef uint32_t gid_t;
60 
64  typedef struct {
65  uint32_t st_dev;
66  uint32_t st_ino;
67  uint32_t st_mode;
68  uint32_t st_nlink;
69  uint32_t st_uid;
70  uint32_t st_gid;
71  uint32_t st_rdev;
72  int32_t _pad1;
73  int64_t st_size;
74  uint64_t st_atimeX;
75  uint64_t st_mtimeX;
76  uint64_t st_ctimeX;
77  uint32_t st_blksize;
78  int32_t st_blocks;
79  uint32_t st_flags;
80  uint32_t st_gen;
81  } tgt_stat;
82 
83  // same for stat64
84  typedef struct {
85  uint64_t st_dev;
86  uint64_t st_ino;
87  uint64_t st_rdev;
88  int64_t st_size;
89  uint64_t st_blocks;
90 
91  uint32_t st_mode;
92  uint32_t st_uid;
93  uint32_t st_gid;
94  uint32_t st_blksize;
95  uint32_t st_nlink;
96  uint32_t __pad0;
97 
98  uint64_t st_atimeX;
99  uint64_t st_atime_nsec;
100  uint64_t st_mtimeX;
101  uint64_t st_mtime_nsec;
102  uint64_t st_ctimeX;
103  uint64_t st_ctime_nsec;
104  int64_t ___unused[3];
105  } tgt_stat64;
106 
108  static const int _SYS_NMLN = 65;
109 
111  struct utsname {
117  };
118 
120  struct rlimit {
121  uint64_t rlim_cur;
122  uint64_t rlim_max;
123  };
124 
126  struct timeval {
127  int64_t tv_sec;
128  int64_t tv_usec;
129  };
130 
132  struct timespec {
134  int64_t tv_nsec;
135  };
136 
138  static const int M5_SC_CLK_TCK = 100;
139 
141  struct tms {
142  int64_t tms_utime;
143  int64_t tms_stime;
144  int64_t tms_cutime;
145  int64_t tms_cstime;
146  };
147 
148  // For writev/readv
149  struct tgt_iovec {
150  uint64_t iov_base; // void *
151  uint64_t iov_len;
152  };
153 
154  // For select().
155  // linux-3.14-src/include/uapi/linux/posix_types.h
156  struct fd_set{
157 #ifndef LINUX__FD_SETSIZE
158 #define LINUX__FD_SETSIZE 1024
159  unsigned long fds_bits[LINUX__FD_SETSIZE / (8 * sizeof(long))];
160 #endif
161  };
162 
164  static const unsigned TGT_TCGETS = 0x5401;
166  static const unsigned TGT_TCGETA = 0x5405;
167  static const unsigned TGT_TCSETAW = 0x5407;
168  static const unsigned TGT_FIONREAD = 0x541B;
170 
175  static bool
176  isTtyReq(unsigned req)
177  {
178  switch (req) {
179  case TGT_FIONREAD:
180  case TGT_TCSETAW:
181  case TGT_TCGETS:
182  case TGT_TCGETA:
183  return true;
184  default:
185  return false;
186  }
187  }
188 
189 
191  static const unsigned TGT_RLIMIT_CPU = 0;
192  static const unsigned TGT_RLIMIT_FSIZE = 1;
193  static const unsigned TGT_RLIMIT_DATA = 2;
194  static const unsigned TGT_RLIMIT_STACK = 3;
195  static const unsigned TGT_RLIMIT_CORE = 4;
196  static const unsigned TGT_RLIMIT_RSS = 5;
197  static const unsigned TGT_RLIMIT_NPROC = 6;
198  static const unsigned TGT_RLIMIT_NOFILE = 7;
199  static const unsigned TGT_RLIMIT_MEMLOCK = 8;
200  static const unsigned TGT_RLIMIT_AS = 9;
201  static const unsigned TGT_RLIMIT_LOCKS = 10;
202  static const unsigned TGT_RLIMIT_SIGPENDING = 11;
203  static const unsigned TGT_RLIMIT_MSGQUEUE = 12;
204  static const unsigned TGT_RLIMIT_NICE = 13;
205  static const unsigned TGT_RLIMIT_RTPRIO = 14;
206  static const unsigned TGT_RLIMIT_RTTIME = 15;
207  static const unsigned TGT_RLIM_NLIMITS = 16;
208 
210  static const int TGT_RUSAGE_SELF = 0;
211  static const int TGT_RUSAGE_CHILDREN = -1;
212  static const int TGT_RUSAGE_BOTH = -2;
213 
214  struct rusage {
215  struct timeval ru_utime;
216  struct timeval ru_stime;
217  int64_t ru_maxrss;
218  int64_t ru_ixrss;
219  int64_t ru_idrss;
220  int64_t ru_isrss;
221  int64_t ru_minflt;
222  int64_t ru_majflt;
223  int64_t ru_nswap;
224  int64_t ru_inblock;
225  int64_t ru_oublock;
226  int64_t ru_msgsnd;
227  int64_t ru_msgrcv;
228  int64_t ru_nsignals;
229  int64_t ru_nvcsw;
230  int64_t ru_nivcsw;
231  };
232 
233  // For /dev/urandom accesses
234  static Random random;
235 
236  static int openSpecialFile(std::string path, Process *process,
237  ThreadContext *tc);
238  static std::string procMeminfo(Process *process, ThreadContext *tc);
239  static std::string etcPasswd(Process *process, ThreadContext *tc);
240  static std::string procSelfMaps(Process *process, ThreadContext *tc);
241  static std::string cpuOnline(Process *process, ThreadContext *tc);
242  static std::string devRandom(Process *process, ThreadContext *tc);
243 
244  // For futex system call
245  static const unsigned TGT_FUTEX_WAIT = 0;
246  static const unsigned TGT_FUTEX_WAKE = 1;
247  static const unsigned TGT_FUTEX_REQUEUE = 3;
248  static const unsigned TGT_FUTEX_CMP_REQUEUE = 4;
249  static const unsigned TGT_FUTEX_WAKE_OP = 5;
250  static const unsigned TGT_FUTEX_WAIT_BITSET = 9;
251  static const unsigned TGT_FUTEX_WAKE_BITSET = 10;
252  static const unsigned TGT_EAGAIN = 11;
253  static const unsigned TGT_EWOULDBLOCK = TGT_EAGAIN;
254  static const unsigned TGT_FUTEX_PRIVATE_FLAG = 128;
255  static const unsigned TGT_FUTEX_CLOCK_REALTIME_FLAG = 256;
256  // op field of futex_wake_op operation
257  static const unsigned TGT_FUTEX_OP_SET = 0; // uaddr2 = oparg;
258  static const unsigned TGT_FUTEX_OP_ADD = 1; // uaddr2 += oparg;
259  static const unsigned TGT_FUTEX_OP_OR = 2; // uaddr2 |= oparg;
260  static const unsigned TGT_FUTEX_OP_ANDN = 3; // uaddr2 &= ~oparg;
261  static const unsigned TGT_FUTEX_OP_XOR = 4; // uaddr2 ^= oparg;
262  // Use (1 << oparg) as operand
263  static const unsigned TGT_FUTEX_OP_ARG_SHIFT = 8;
264  // cmp field of futex_wake_op operation
265  static const unsigned TGT_FUTEX_OP_CMP_EQ = 0;
266  static const unsigned TGT_FUTEX_OP_CMP_NE = 1;
267  static const unsigned TGT_FUTEX_OP_CMP_LT = 2;
268  static const unsigned TGT_FUTEX_OP_CMP_LE = 3;
269  static const unsigned TGT_FUTEX_OP_CMP_GT = 4;
270  static const unsigned TGT_FUTEX_OP_CMP_GE = 5;
271 
272  // for *at syscalls
273  static const int TGT_AT_FDCWD = -100;
274 
275  // for MREMAP
276  static const unsigned TGT_MREMAP_MAYMOVE = 0x1;
277  static const unsigned TGT_MREMAP_FIXED = 0x2;
278 
279  static const unsigned TGT_CLONE_VM = 0x00000100;
280  static const unsigned TGT_CLONE_FS = 0x00000200;
281  static const unsigned TGT_CLONE_FILES = 0x00000400;
282  static const unsigned TGT_CLONE_SIGHAND = 0x00000800;
283  static const unsigned TGT_CLONE_PTRACE = 0x00002000;
284  static const unsigned TGT_CLONE_VFORK = 0x00004000;
285  static const unsigned TGT_CLONE_PARENT = 0x00008000;
286  static const unsigned TGT_CLONE_THREAD = 0x00010000;
287  static const unsigned TGT_CLONE_NEWNS = 0x00020000;
288  static const unsigned TGT_CLONE_SYSVSEM = 0x00040000;
289  static const unsigned TGT_CLONE_SETTLS = 0x00080000;
290  static const unsigned TGT_CLONE_PARENT_SETTID = 0x00100000;
291  static const unsigned TGT_CLONE_CHILD_CLEARTID = 0x00200000;
292  static const unsigned TGT_CLONE_DETACHED = 0x00400000;
293  static const unsigned TGT_CLONE_UNTRACED = 0x00800000;
294  static const unsigned TGT_CLONE_CHILD_SETTID = 0x01000000;
295  static const unsigned TGT_CLONE_NEWUTS = 0x04000000;
296  static const unsigned TGT_CLONE_NEWIPC = 0x08000000;
297  static const unsigned TGT_CLONE_NEWUSER = 0x10000000;
298  static const unsigned TGT_CLONE_NEWPID = 0x20000000;
299  static const unsigned TGT_CLONE_NEWNET = 0x40000000;
300  static const unsigned TGT_CLONE_IO = 0x80000000;
301 
302  // linux-3.13-src/include/uapi/linux/wait.h
303  static const unsigned TGT_WNOHANG = 0x00000001;
304  static const unsigned TGT_WUNTRACED = 0x00000002;
305  static const unsigned TGT_WSTOPPED = TGT_WUNTRACED;
306  static const unsigned TGT_WEXITED = 0x00000004;
307  static const unsigned TGT_WCONTINUED = 0x00000008;
308  static const unsigned TGT_WNOWAIT = 0x01000000;
309 }; // class Linux
310 
311 #endif // __LINUX_HH__
Linux::tgt_stat64::st_ctime_nsec
uint64_t st_ctime_nsec
Definition: linux.hh:103
Linux::tms::tms_cstime
int64_t tms_cstime
system time of children
Definition: linux.hh:145
Linux::rusage::ru_inblock
int64_t ru_inblock
block input operations
Definition: linux.hh:224
Linux::time_t
int64_t time_t
Definition: linux.hh:55
Linux::TGT_FUTEX_WAIT
static const unsigned TGT_FUTEX_WAIT
Definition: linux.hh:245
Linux::TGT_WEXITED
static const unsigned TGT_WEXITED
Definition: linux.hh:306
Linux::TGT_TCGETA
static const unsigned TGT_TCGETA
Definition: linux.hh:166
Linux::TGT_RLIMIT_RSS
static const unsigned TGT_RLIMIT_RSS
Definition: linux.hh:196
Linux::tgt_iovec
Definition: linux.hh:149
Linux::tgt_stat64::st_blocks
uint64_t st_blocks
Definition: linux.hh:89
Linux::TGT_FUTEX_WAKE_OP
static const unsigned TGT_FUTEX_WAKE_OP
Definition: linux.hh:249
Linux::TGT_RLIMIT_NICE
static const unsigned TGT_RLIMIT_NICE
Definition: linux.hh:204
Linux::TGT_FUTEX_WAIT_BITSET
static const unsigned TGT_FUTEX_WAIT_BITSET
Definition: linux.hh:250
Linux::TGT_RLIMIT_MEMLOCK
static const unsigned TGT_RLIMIT_MEMLOCK
Definition: linux.hh:199
Linux::rusage::ru_oublock
int64_t ru_oublock
block output operations
Definition: linux.hh:225
Linux::TGT_CLONE_NEWPID
static const unsigned TGT_CLONE_NEWPID
Definition: linux.hh:298
Linux::TGT_RUSAGE_CHILDREN
static const int TGT_RUSAGE_CHILDREN
Definition: linux.hh:211
Linux::TGT_RLIMIT_AS
static const unsigned TGT_RLIMIT_AS
Definition: linux.hh:200
Linux::TGT_FUTEX_OP_CMP_LT
static const unsigned TGT_FUTEX_OP_CMP_LT
Definition: linux.hh:267
Linux::fd_set
Definition: linux.hh:156
Process
Definition: process.hh:65
Linux::rlimit
Limit struct for getrlimit/setrlimit.
Definition: linux.hh:120
Linux::TGT_FIONREAD
static const unsigned TGT_FIONREAD
Definition: linux.hh:168
Linux::tgt_stat64::st_size
int64_t st_size
Definition: linux.hh:88
Linux::rusage::ru_maxrss
int64_t ru_maxrss
max rss
Definition: linux.hh:217
Linux::rusage::ru_utime
struct timeval ru_utime
user time used
Definition: linux.hh:215
Linux::uid_t
uint32_t uid_t
Definition: linux.hh:57
Linux::tgt_stat::st_dev
uint32_t st_dev
device
Definition: linux.hh:65
Linux::tgt_stat::st_blksize
uint32_t st_blksize
optimal I/O block size
Definition: linux.hh:77
Linux::TGT_CLONE_FILES
static const unsigned TGT_CLONE_FILES
Definition: linux.hh:281
Linux::TGT_CLONE_SYSVSEM
static const unsigned TGT_CLONE_SYSVSEM
Definition: linux.hh:288
Linux::TGT_CLONE_NEWNS
static const unsigned TGT_CLONE_NEWNS
Definition: linux.hh:287
random.hh
Linux::TGT_FUTEX_OP_CMP_EQ
static const unsigned TGT_FUTEX_OP_CMP_EQ
Definition: linux.hh:265
Linux::TGT_CLONE_CHILD_SETTID
static const unsigned TGT_CLONE_CHILD_SETTID
Definition: linux.hh:294
Linux::rusage::ru_msgsnd
int64_t ru_msgsnd
messages sent
Definition: linux.hh:226
Linux::TGT_CLONE_FS
static const unsigned TGT_CLONE_FS
Definition: linux.hh:280
Linux::TGT_RLIMIT_NOFILE
static const unsigned TGT_RLIMIT_NOFILE
Definition: linux.hh:198
Linux::size_t
uint64_t size_t
Basic Linux types.
Definition: linux.hh:53
Linux::TGT_CLONE_CHILD_CLEARTID
static const unsigned TGT_CLONE_CHILD_CLEARTID
Definition: linux.hh:291
Linux::utsname::version
char version[_SYS_NMLN]
OS version.
Definition: linux.hh:115
Linux::TGT_WCONTINUED
static const unsigned TGT_WCONTINUED
Definition: linux.hh:307
OperatingSystem
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: operatingsystem.hh:52
Linux::TGT_CLONE_NEWUSER
static const unsigned TGT_CLONE_NEWUSER
Definition: linux.hh:297
Linux::tgt_stat64::st_dev
uint64_t st_dev
Definition: linux.hh:85
OperatingSystem::tgt_stat64
void tgt_stat64
Definition: operatingsystem.hh:62
Linux::rusage::ru_msgrcv
int64_t ru_msgrcv
messages received
Definition: linux.hh:227
Linux::TGT_EAGAIN
static const unsigned TGT_EAGAIN
Definition: linux.hh:252
Linux::tms::tms_stime
int64_t tms_stime
system time
Definition: linux.hh:143
Linux::TGT_RLIMIT_MSGQUEUE
static const unsigned TGT_RLIMIT_MSGQUEUE
Definition: linux.hh:203
Linux::tgt_stat64::st_blksize
uint32_t st_blksize
Definition: linux.hh:94
Linux::procMeminfo
static std::string procMeminfo(Process *process, ThreadContext *tc)
Definition: linux.cc:90
Linux::TGT_CLONE_VFORK
static const unsigned TGT_CLONE_VFORK
Definition: linux.hh:284
Linux::TGT_FUTEX_OP_CMP_LE
static const unsigned TGT_FUTEX_OP_CMP_LE
Definition: linux.hh:268
Linux::etcPasswd
static std::string etcPasswd(Process *process, ThreadContext *tc)
Definition: linux.cc:98
Linux::TGT_CLONE_VM
static const unsigned TGT_CLONE_VM
Definition: linux.hh:279
Linux::M5_SC_CLK_TCK
static const int M5_SC_CLK_TCK
Clock ticks per second, for times().
Definition: linux.hh:138
Linux::tgt_stat::st_mode
uint32_t st_mode
mode
Definition: linux.hh:67
Linux::TGT_FUTEX_WAKE_BITSET
static const unsigned TGT_FUTEX_WAKE_BITSET
Definition: linux.hh:251
Linux::timespec::tv_nsec
int64_t tv_nsec
nanoseconds
Definition: linux.hh:134
Linux::tgt_stat::_pad1
int32_t _pad1
for alignment
Definition: linux.hh:72
Linux::tgt_stat64::st_atime_nsec
uint64_t st_atime_nsec
Definition: linux.hh:99
Linux::TGT_CLONE_NEWNET
static const unsigned TGT_CLONE_NEWNET
Definition: linux.hh:299
Linux::TGT_MREMAP_FIXED
static const unsigned TGT_MREMAP_FIXED
Definition: linux.hh:277
Linux::tgt_stat::st_gid
uint32_t st_gid
owner's group ID
Definition: linux.hh:70
Linux::rusage::ru_nsignals
int64_t ru_nsignals
signals received
Definition: linux.hh:228
Linux::TGT_RLIMIT_DATA
static const unsigned TGT_RLIMIT_DATA
Definition: linux.hh:193
Linux::TGT_MREMAP_MAYMOVE
static const unsigned TGT_MREMAP_MAYMOVE
Definition: linux.hh:276
Linux::TGT_WNOHANG
static const unsigned TGT_WNOHANG
Definition: linux.hh:303
Linux::TGT_CLONE_SETTLS
static const unsigned TGT_CLONE_SETTLS
Definition: linux.hh:289
Linux::rlimit::rlim_max
uint64_t rlim_max
hard limit
Definition: linux.hh:122
Linux::TGT_WUNTRACED
static const unsigned TGT_WUNTRACED
Definition: linux.hh:304
Linux::rusage::ru_nswap
int64_t ru_nswap
swaps
Definition: linux.hh:223
Linux::tgt_stat64::st_mtime_nsec
uint64_t st_mtime_nsec
Definition: linux.hh:101
Linux::TGT_RLIMIT_CORE
static const unsigned TGT_RLIMIT_CORE
Definition: linux.hh:195
Linux::tgt_stat::st_blocks
int32_t st_blocks
number of blocks allocated
Definition: linux.hh:78
Linux::_SYS_NMLN
static const int _SYS_NMLN
Length of strings in struct utsname (plus 1 for null char).
Definition: linux.hh:108
Linux::TGT_EWOULDBLOCK
static const unsigned TGT_EWOULDBLOCK
Definition: linux.hh:253
Linux::TGT_FUTEX_OP_CMP_GT
static const unsigned TGT_FUTEX_OP_CMP_GT
Definition: linux.hh:269
Linux::TGT_FUTEX_OP_SET
static const unsigned TGT_FUTEX_OP_SET
Definition: linux.hh:257
Linux::tgt_stat::st_atimeX
uint64_t st_atimeX
time of last access
Definition: linux.hh:74
Linux::tgt_iovec::iov_base
uint64_t iov_base
Definition: linux.hh:150
Linux::TGT_FUTEX_OP_ADD
static const unsigned TGT_FUTEX_OP_ADD
Definition: linux.hh:258
Linux::TGT_FUTEX_PRIVATE_FLAG
static const unsigned TGT_FUTEX_PRIVATE_FLAG
Definition: linux.hh:254
Linux::TGT_RLIMIT_STACK
static const unsigned TGT_RLIMIT_STACK
Definition: linux.hh:194
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Linux::TGT_CLONE_UNTRACED
static const unsigned TGT_CLONE_UNTRACED
Definition: linux.hh:293
Random
Definition: random.hh:58
Linux::utsname::release
char release[_SYS_NMLN]
OS release.
Definition: linux.hh:114
Linux::procSelfMaps
static std::string procSelfMaps(Process *process, ThreadContext *tc)
Definition: linux.cc:105
Linux::TGT_CLONE_NEWUTS
static const unsigned TGT_CLONE_NEWUTS
Definition: linux.hh:295
Linux::TGT_RLIMIT_SIGPENDING
static const unsigned TGT_RLIMIT_SIGPENDING
Definition: linux.hh:202
Linux::openSpecialFile
static int openSpecialFile(std::string path, Process *process, ThreadContext *tc)
Definition: linux.cc:46
Linux::devRandom
static std::string devRandom(Process *process, ThreadContext *tc)
Definition: linux.cc:117
process.hh
Linux::tgt_stat64::st_rdev
uint64_t st_rdev
Definition: linux.hh:87
Linux::tgt_stat::st_flags
uint32_t st_flags
flags
Definition: linux.hh:79
Linux::tgt_stat::st_mtimeX
uint64_t st_mtimeX
time of last modification
Definition: linux.hh:75
Linux::TGT_CLONE_THREAD
static const unsigned TGT_CLONE_THREAD
Definition: linux.hh:286
operatingsystem.hh
Linux::TGT_FUTEX_WAKE
static const unsigned TGT_FUTEX_WAKE
Definition: linux.hh:246
Linux::rusage::ru_nvcsw
int64_t ru_nvcsw
voluntary context switches
Definition: linux.hh:229
Linux::rusage::ru_minflt
int64_t ru_minflt
page reclaims - total vmfaults
Definition: linux.hh:221
Linux::TGT_CLONE_DETACHED
static const unsigned TGT_CLONE_DETACHED
Definition: linux.hh:292
Linux::off_t
uint64_t off_t
Definition: linux.hh:54
Linux::tgt_iovec::iov_len
uint64_t iov_len
Definition: linux.hh:151
Linux::rusage::ru_ixrss
int64_t ru_ixrss
integral shared memory size
Definition: linux.hh:218
Linux::cpuOnline
static std::string cpuOnline(Process *process, ThreadContext *tc)
Definition: linux.cc:111
Linux::tms::tms_cutime
int64_t tms_cutime
user time of children
Definition: linux.hh:144
Linux::rusage::ru_isrss
int64_t ru_isrss
integral unshared stack "
Definition: linux.hh:220
Linux::tgt_stat64::st_atimeX
uint64_t st_atimeX
Definition: linux.hh:98
Linux::TGT_WSTOPPED
static const unsigned TGT_WSTOPPED
Definition: linux.hh:305
Linux::timespec
For clock_gettime().
Definition: linux.hh:132
Linux::TGT_CLONE_PTRACE
static const unsigned TGT_CLONE_PTRACE
Definition: linux.hh:283
Linux::TGT_RLIMIT_RTTIME
static const unsigned TGT_RLIMIT_RTTIME
Definition: linux.hh:206
Linux::tgt_stat::st_uid
uint32_t st_uid
owner's user ID
Definition: linux.hh:69
Linux::TGT_TCSETAW
static const unsigned TGT_TCSETAW
Definition: linux.hh:167
Linux::TGT_RLIMIT_LOCKS
static const unsigned TGT_RLIMIT_LOCKS
Definition: linux.hh:201
Linux::utsname::sysname
char sysname[_SYS_NMLN]
System name.
Definition: linux.hh:112
Linux::utsname
Interface struct for uname().
Definition: linux.hh:111
Linux::tgt_stat::st_nlink
uint32_t st_nlink
link count
Definition: linux.hh:68
Linux::TGT_RUSAGE_SELF
static const int TGT_RUSAGE_SELF
For getrusage().
Definition: linux.hh:210
Linux::TGT_RLIMIT_NPROC
static const unsigned TGT_RLIMIT_NPROC
Definition: linux.hh:197
Linux::tms::tms_utime
int64_t tms_utime
user time
Definition: linux.hh:142
Linux::TGT_AT_FDCWD
static const int TGT_AT_FDCWD
Definition: linux.hh:273
Linux::TGT_FUTEX_OP_ANDN
static const unsigned TGT_FUTEX_OP_ANDN
Definition: linux.hh:260
Linux::tgt_stat64::st_mode
uint32_t st_mode
Definition: linux.hh:91
Linux::TGT_CLONE_PARENT
static const unsigned TGT_CLONE_PARENT
Definition: linux.hh:285
Linux::TGT_RLIMIT_CPU
static const unsigned TGT_RLIMIT_CPU
Resource constants for getrlimit().
Definition: linux.hh:191
Linux::TGT_WNOWAIT
static const unsigned TGT_WNOWAIT
Definition: linux.hh:308
Linux::tgt_stat::st_rdev
uint32_t st_rdev
device number
Definition: linux.hh:71
Linux::rusage
Definition: linux.hh:214
Linux::TGT_CLONE_NEWIPC
static const unsigned TGT_CLONE_NEWIPC
Definition: linux.hh:296
Linux::rusage::ru_majflt
int64_t ru_majflt
page faults
Definition: linux.hh:222
Linux::utsname::nodename
char nodename[_SYS_NMLN]
Node name.
Definition: linux.hh:113
Linux::TGT_CLONE_IO
static const unsigned TGT_CLONE_IO
Definition: linux.hh:300
types.hh
Linux::random
static Random random
Definition: linux.hh:234
Linux::tgt_stat64::st_ctimeX
uint64_t st_ctimeX
Definition: linux.hh:102
Linux::tgt_stat64::__pad0
uint32_t __pad0
Definition: linux.hh:96
Linux::TGT_FUTEX_OP_CMP_NE
static const unsigned TGT_FUTEX_OP_CMP_NE
Definition: linux.hh:266
Linux::tgt_stat::st_ino
uint32_t st_ino
inode
Definition: linux.hh:66
Linux::TGT_FUTEX_OP_OR
static const unsigned TGT_FUTEX_OP_OR
Definition: linux.hh:259
Linux::clock_t
int64_t clock_t
Definition: linux.hh:56
Linux::TGT_TCGETS
static const unsigned TGT_TCGETS
ioctl() command codes.
Definition: linux.hh:165
Linux::TGT_RLIM_NLIMITS
static const unsigned TGT_RLIM_NLIMITS
Definition: linux.hh:207
Linux::tgt_stat::st_gen
uint32_t st_gen
unknown
Definition: linux.hh:80
LINUX__FD_SETSIZE
#define LINUX__FD_SETSIZE
Definition: linux.hh:158
Linux::TGT_FUTEX_CLOCK_REALTIME_FLAG
static const unsigned TGT_FUTEX_CLOCK_REALTIME_FLAG
Definition: linux.hh:255
OperatingSystem::tgt_stat
void tgt_stat
Stat buffer.
Definition: operatingsystem.hh:59
Linux::timeval
For gettimeofday().
Definition: linux.hh:126
Linux::tgt_stat64::st_mtimeX
uint64_t st_mtimeX
Definition: linux.hh:100
Linux::TGT_FUTEX_REQUEUE
static const unsigned TGT_FUTEX_REQUEUE
Definition: linux.hh:247
Linux::tms
For times().
Definition: linux.hh:141
Linux::timeval::tv_sec
int64_t tv_sec
seconds
Definition: linux.hh:127
Linux::tgt_stat64::st_uid
uint32_t st_uid
Definition: linux.hh:92
Linux::TGT_FUTEX_OP_ARG_SHIFT
static const unsigned TGT_FUTEX_OP_ARG_SHIFT
Definition: linux.hh:263
Linux::tgt_stat::st_ctimeX
uint64_t st_ctimeX
time of last status change
Definition: linux.hh:76
Linux::timeval::tv_usec
int64_t tv_usec
microseconds
Definition: linux.hh:128
Linux::TGT_FUTEX_OP_CMP_GE
static const unsigned TGT_FUTEX_OP_CMP_GE
Definition: linux.hh:270
Linux::timespec::tv_sec
time_t tv_sec
seconds
Definition: linux.hh:133
Linux::tgt_stat::st_size
int64_t st_size
file size in bytes
Definition: linux.hh:73
Linux::tgt_stat64::st_ino
uint64_t st_ino
Definition: linux.hh:86
Linux
Definition: threadinfo.hh:35
Linux::rusage::ru_nivcsw
int64_t ru_nivcsw
involuntary "
Definition: linux.hh:230
Linux::gid_t
uint32_t gid_t
Definition: linux.hh:58
Linux::TGT_FUTEX_OP_XOR
static const unsigned TGT_FUTEX_OP_XOR
Definition: linux.hh:261
Linux::TGT_FUTEX_CMP_REQUEUE
static const unsigned TGT_FUTEX_CMP_REQUEUE
Definition: linux.hh:248
Linux::TGT_RLIMIT_FSIZE
static const unsigned TGT_RLIMIT_FSIZE
Definition: linux.hh:192
Linux::TGT_CLONE_PARENT_SETTID
static const unsigned TGT_CLONE_PARENT_SETTID
Definition: linux.hh:290
Linux::tgt_stat64::st_gid
uint32_t st_gid
Definition: linux.hh:93
Linux::utsname::machine
char machine[_SYS_NMLN]
Machine type.
Definition: linux.hh:116
Linux::rlimit::rlim_cur
uint64_t rlim_cur
soft limit
Definition: linux.hh:121
Linux::TGT_RUSAGE_BOTH
static const int TGT_RUSAGE_BOTH
Definition: linux.hh:212
Linux::TGT_CLONE_SIGHAND
static const unsigned TGT_CLONE_SIGHAND
Definition: linux.hh:282
Linux::tgt_stat64::st_nlink
uint32_t st_nlink
Definition: linux.hh:95
Linux::rusage::ru_idrss
int64_t ru_idrss
integral unshared data "
Definition: linux.hh:219
Linux::isTtyReq
static bool isTtyReq(unsigned req)
Return true for the ioctl codes for which we return ENOTTY without printing a warning,...
Definition: linux.hh:176
Linux::fd_set::fds_bits
unsigned long fds_bits[LINUX__FD_SETSIZE/(8 *sizeof(long))]
Definition: linux.hh:159
Linux::TGT_RLIMIT_RTPRIO
static const unsigned TGT_RLIMIT_RTPRIO
Definition: linux.hh:205
Linux::rusage::ru_stime
struct timeval ru_stime
system time used
Definition: linux.hh:216

Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17