linux.hh (9141:593fe25c86a6) linux.hh (9146:a61fdbbc1d45)
1/*
2 * Copyright (c) 2003-2005 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;

--- 70 unchanged lines hidden (view full) ---

79 static const unsigned GSI_MAX_CPU = 30; //!< max # CPUs on machine
80 static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system
81 static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
82 static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
83 static const unsigned GSI_IEEE_FP_CONTROL = 45;
84 //@}
85
86 //@{
1/*
2 * Copyright (c) 2003-2005 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;

--- 70 unchanged lines hidden (view full) ---

79 static const unsigned GSI_MAX_CPU = 30; //!< max # CPUs on machine
80 static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system
81 static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
82 static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
83 static const unsigned GSI_IEEE_FP_CONTROL = 45;
84 //@}
85
86 //@{
87 /// For getrusage().
88 static const int TGT_RUSAGE_SELF = 0;
89 static const int TGT_RUSAGE_CHILDREN = -1;
90 static const int TGT_RUSAGE_BOTH = -2;
91 //@}
92
93 //@{
94 /// For setsysinfo().
95 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control()
96 //@}
97
98 //@{
99 /// ioctl() command codes.
100 static const unsigned TGT_TIOCGETP = 0x40067408;
101 static const unsigned TGT_TIOCSETP = 0x80067409;

--- 22 unchanged lines hidden (view full) ---

124 default:
125 return false;
126 }
127 }
128
129 /// For table().
130 static const int TBL_SYSINFO = 12;
131
87 /// For setsysinfo().
88 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control()
89 //@}
90
91 //@{
92 /// ioctl() command codes.
93 static const unsigned TGT_TIOCGETP = 0x40067408;
94 static const unsigned TGT_TIOCSETP = 0x80067409;

--- 22 unchanged lines hidden (view full) ---

117 default:
118 return false;
119 }
120 }
121
122 /// For table().
123 static const int TBL_SYSINFO = 12;
124
132 /// Resource enumeration for getrlimit().
133 enum rlimit_resources {
134 TGT_RLIMIT_CPU = 0,
135 TGT_RLIMIT_FSIZE = 1,
136 TGT_RLIMIT_DATA = 2,
137 TGT_RLIMIT_STACK = 3,
138 TGT_RLIMIT_CORE = 4,
139 TGT_RLIMIT_RSS = 5,
140 TGT_RLIMIT_NOFILE = 6,
141 TGT_RLIMIT_AS = 7,
142 TGT_RLIMIT_VMEM = 7,
143 TGT_RLIMIT_NPROC = 8,
144 TGT_RLIMIT_MEMLOCK = 9,
145 TGT_RLIMIT_LOCKS = 10
146 };
125 /// Resource constants for getrlimit() (overide some generics).
126 static const unsigned TGT_RLIMIT_NPROC = 8;
127 static const unsigned TGT_RLIMIT_AS = 7;
128 static const unsigned TGT_RLIMIT_NOFILE = 6;
129 static const unsigned TGT_RLIMIT_MEMLOCK = 9;
147
148 typedef struct {
149 int64_t uptime; /* Seconds since boot */
150 uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
151 uint64_t totalram; /* Total usable main memory size */
152 uint64_t freeram; /* Available memory size */
153 uint64_t sharedram; /* Amount of shared memory */
154 uint64_t bufferram; /* Memory used by buffers */

--- 14 unchanged lines hidden ---
130
131 typedef struct {
132 int64_t uptime; /* Seconds since boot */
133 uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
134 uint64_t totalram; /* Total usable main memory size */
135 uint64_t freeram; /* Available memory size */
136 uint64_t sharedram; /* Amount of shared memory */
137 uint64_t bufferram; /* Memory used by buffers */

--- 14 unchanged lines hidden ---