linux.hh (9141:593fe25c86a6) | linux.hh (9146:a61fdbbc1d45) |
---|---|
1/* 2 * Copyright (c) 2006 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; --- 65 unchanged lines hidden (view full) --- 74 static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type 75 static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine 76 static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system 77 static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB 78 static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz 79 //@} 80 81 //@{ | 1/* 2 * Copyright (c) 2006 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; --- 65 unchanged lines hidden (view full) --- 74 static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type 75 static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine 76 static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system 77 static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB 78 static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz 79 //@} 80 81 //@{ |
82 /// For getrusage(). 83 static const int TGT_RUSAGE_SELF = 0; 84 static const int TGT_RUSAGE_CHILDREN = -1; 85 static const int TGT_RUSAGE_BOTH = -2; 86 //@} 87 88 //@{ | |
89 /// For setsysinfo(). 90 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control() 91 //@} 92 93 //@{ 94 /// ioctl() command codes. 95 static const unsigned TGT_TCGETA = 0x5401; 96 static const unsigned TGT_TCSETAW = 0x5403; --- 19 unchanged lines hidden (view full) --- 116 default: 117 return false; 118 } 119 } 120 121 /// For table(). 122 static const int TBL_SYSINFO = 12; 123 | 82 /// For setsysinfo(). 83 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control() 84 //@} 85 86 //@{ 87 /// ioctl() command codes. 88 static const unsigned TGT_TCGETA = 0x5401; 89 static const unsigned TGT_TCSETAW = 0x5403; --- 19 unchanged lines hidden (view full) --- 109 default: 110 return false; 111 } 112 } 113 114 /// For table(). 115 static const int TBL_SYSINFO = 12; 116 |
124 /// Resource enumeration for getrlimit()/setrlimit(). 125 enum rlimit_resources { 126 TGT_RLIMIT_CPU = 0, 127 TGT_RLIMIT_FSIZE = 1, 128 TGT_RLIMIT_DATA = 2, 129 TGT_RLIMIT_STACK = 3, 130 TGT_RLIMIT_CORE = 4, 131 TGT_RLIMIT_NOFILE = 5, 132 TGT_RLIMIT_AS = 6, 133 TGT_RLIMIT_RSS = 7, 134 TGT_RLIMIT_VMEM = 7, 135 TGT_RLIMIT_NPROC = 8, 136 TGT_RLIMIT_MEMLOCK = 9, 137 TGT_RLIMIT_LOCKS = 10, 138 NUM_RLIMIT_RESOURCES 139 }; | 117 /// Resource constants for getrlimit() (overide some generics). 118 static const unsigned TGT_RLIMIT_NPROC = 8; 119 static const unsigned TGT_RLIMIT_AS = 6; 120 static const unsigned RLIMIT_RSS = 7; 121 static const unsigned TGT_RLIMIT_NOFILE = 5; 122 static const unsigned TGT_RLIMIT_MEMLOCK = 9; |
140 141 /// Offset used to make sure that processes don't 142 /// assign themselves to process IDs reserved for 143 /// the root users. 144 static const int NUM_ROOT_PROCS = 2; 145 146 typedef struct { 147 int32_t uptime; /* Seconds since boot */ --- 16 unchanged lines hidden --- | 123 124 /// Offset used to make sure that processes don't 125 /// assign themselves to process IDs reserved for 126 /// the root users. 127 static const int NUM_ROOT_PROCS = 2; 128 129 typedef struct { 130 int32_t uptime; /* Seconds since boot */ --- 16 unchanged lines hidden --- |