linux.hh (6395:05f1d2cd7e9e) linux.hh (6413:424ac9b1079a)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007-2008 The Florida State University
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

61 static const int TGT_O_DIRECTORY = 00040000; //!< O_DIRECTORY
62 static const int TGT_O_NOFOLLOW = 00100000; //!< O_NOFOLLOW
63 static const int TGT_O_DIRECT = 00200000; //!< O_DIRECT
64 static const int TGT_O_LARGEFILE = 00400000; //!< O_LARGEFILE
65 static const int TGT_O_NOATIME = 01000000; //!< O_NOATIME
66 //@}
67
68 /// For mmap().
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007-2008 The Florida State University
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

61 static const int TGT_O_DIRECTORY = 00040000; //!< O_DIRECTORY
62 static const int TGT_O_NOFOLLOW = 00100000; //!< O_NOFOLLOW
63 static const int TGT_O_DIRECT = 00200000; //!< O_DIRECT
64 static const int TGT_O_LARGEFILE = 00400000; //!< O_LARGEFILE
65 static const int TGT_O_NOATIME = 01000000; //!< O_NOATIME
66 //@}
67
68 /// For mmap().
69 static const unsigned TGT_MAP_ANONYMOUS = 0x800;
69 static const unsigned TGT_MAP_ANONYMOUS = 0x20;
70
71 //@{
70
71 //@{
72 /// For getsysinfo().
73 static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string
74 static const unsigned GSI_CPU_INFO = 59; //!< CPU information
75 static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type
76 static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine
77 static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system
78 static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
79 static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
80 //@}
81
82 //@{
83 /// For getrusage().
84 static const int TGT_RUSAGE_SELF = 0;
85 static const int TGT_RUSAGE_CHILDREN = -1;
86 static const int TGT_RUSAGE_BOTH = -2;
87 //@}
88
89 //@{
72 /// For getrusage().
73 static const int TGT_RUSAGE_SELF = 0;
74 static const int TGT_RUSAGE_CHILDREN = -1;
75 static const int TGT_RUSAGE_BOTH = -2;
76 //@}
77
78 //@{
90 /// For setsysinfo().
91 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control()
92 //@}
93
94 //@{
95 /// ioctl() command codes.
96 static const unsigned TIOCGETP_ = 0x40067408;
97 static const unsigned TIOCSETP_ = 0x80067409;
98 static const unsigned TIOCSETN_ = 0x8006740a;
99 static const unsigned TIOCSETC_ = 0x80067411;
100 static const unsigned TIOCGETC_ = 0x40067412;
101 static const unsigned FIONREAD_ = 0x4004667f;
102 static const unsigned TIOCISATTY_ = 0x2000745e;

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

109
110 /// Resource enumeration for getrlimit().
111 enum rlimit_resources {
112 TGT_RLIMIT_CPU = 0,
113 TGT_RLIMIT_FSIZE = 1,
114 TGT_RLIMIT_DATA = 2,
115 TGT_RLIMIT_STACK = 3,
116 TGT_RLIMIT_CORE = 4,
79 /// ioctl() command codes.
80 static const unsigned TIOCGETP_ = 0x40067408;
81 static const unsigned TIOCSETP_ = 0x80067409;
82 static const unsigned TIOCSETN_ = 0x8006740a;
83 static const unsigned TIOCSETC_ = 0x80067411;
84 static const unsigned TIOCGETC_ = 0x40067412;
85 static const unsigned FIONREAD_ = 0x4004667f;
86 static const unsigned TIOCISATTY_ = 0x2000745e;

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

93
94 /// Resource enumeration for getrlimit().
95 enum rlimit_resources {
96 TGT_RLIMIT_CPU = 0,
97 TGT_RLIMIT_FSIZE = 1,
98 TGT_RLIMIT_DATA = 2,
99 TGT_RLIMIT_STACK = 3,
100 TGT_RLIMIT_CORE = 4,
117 TGT_RLIMIT_NOFILE = 5,
118 TGT_RLIMIT_AS = 6,
119 TGT_RLIMIT_RSS = 7,
120 TGT_RLIMIT_VMEM = 7,
121 TGT_RLIMIT_NPROC = 8,
122 TGT_RLIMIT_MEMLOCK = 9,
101 TGT_RLIMIT_RSS = 5,
102 TGT_RLIMIT_NPROC = 6,
103 TGT_RLIMIT_NOFILE = 7,
104 TGT_RLIMIT_MEMLOCK = 8,
105 TGT_RLIMIT_AS = 9,
123 TGT_RLIMIT_LOCKS = 10
124 };
125
126 typedef struct {
127 uint32_t st_dev;
128 uint32_t st_ino;
129 uint16_t st_mode;
130 uint16_t st_nlink;

--- 40 unchanged lines hidden ---
106 TGT_RLIMIT_LOCKS = 10
107 };
108
109 typedef struct {
110 uint32_t st_dev;
111 uint32_t st_ino;
112 uint16_t st_mode;
113 uint16_t st_nlink;

--- 40 unchanged lines hidden ---