gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
solaris.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-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;
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 __SOLARIS_HH__
30 #define __SOLARIS_HH__
31 
32 #include "base/types.hh"
33 #include "kern/operatingsystem.hh"
34 
40 class Solaris : public OperatingSystem
41 {
42 
43  public:
44 
46  typedef uint64_t size_t;
48  typedef uint64_t off_t;
49  typedef int64_t time_t;
50  typedef int32_t uid_t;
51  typedef int32_t gid_t;
52  typedef uint64_t rlim_t;
53  typedef uint64_t ino_t;
54  typedef uint64_t dev_t;
55  typedef uint32_t mode_t;
56  typedef uint32_t nlink_t;
58 
59  struct tgt_timespec {
60  int64_t tv_sec;
61  int64_t tv_nsec;
62  };
63 
66  typedef struct {
67  uint64_t st_dev;
68  uint64_t st_ino;
69  uint32_t st_mode;
70  uint32_t st_nlink;
71  int32_t st_uid;
72  int32_t st_gid;
73  uint64_t st_rdev;
74  int64_t st_size;
75  //struct tgt_timespec st_atimeX; //!< time of last access
76  //struct tgt_timespec st_mtimeX; //!< time of last modification
77  //struct tgt_timespec st_ctimeX; //!< time of last status change
78  int64_t st_atimeX, st_mtimeX, st_ctimeX;
79  int32_t st_blksize;
80  int64_t st_blocks;
81  char st_fstype[16];
82  } tgt_stat;
83 
84  // same for stat64
85  typedef struct {
86  uint64_t st_dev;
87  uint64_t st_ino;
88  uint32_t st_mode;
89  uint32_t st_nlink;
90  int32_t st_uid;
91  int32_t st_gid;
92  uint64_t st_rdev;
93  int64_t st_size;
94  //struct tgt_timespec st_atimeX; //!< time of last access
95  //struct tgt_timespec st_mtimeX; //!< time of last modification
96  //struct tgt_timespec st_ctimeX; //!< time of last status change
97  int64_t st_atimeX, st_mtimeX, st_ctimeX;
98  int32_t st_blksize;
99  int64_t st_blocks;
100  char st_fstype[16];
101  } tgt_stat64;
102 
104  static const int _SYS_NMLN = 257;
105 
107  typedef struct utsname {
108  char sysname[_SYS_NMLN];
109  char nodename[_SYS_NMLN];
110  char release[_SYS_NMLN];
111  char version[_SYS_NMLN];
112  char machine[_SYS_NMLN];
113  } utsname;
114 
115  // for *at syscalls
116  static const int TGT_AT_FDCWD = -100;
117 
118 }; // class Solaris
119 
120 #endif // __SOLARIS_HH__
uint64_t st_dev
device
Definition: solaris.hh:67
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:79
uint32_t st_mode
mode
Definition: solaris.hh:69
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
uint32_t nlink_t
Definition: solaris.hh:56
uint64_t st_ino
inode
Definition: solaris.hh:87
uint32_t st_nlink
link count
Definition: solaris.hh:89
Interface struct for uname().
Definition: solaris.hh:107
static const int _SYS_NMLN
Length of strings in struct utsname (plus 1 for null char).
Definition: solaris.hh:104
uint64_t st_rdev
device number
Definition: solaris.hh:92
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:80
uint32_t st_mode
mode
Definition: solaris.hh:88
int32_t st_gid
owner&#39;s group ID
Definition: solaris.hh:91
int64_t time_t
Definition: solaris.hh:49
int32_t gid_t
Definition: solaris.hh:51
static const int TGT_AT_FDCWD
Definition: solaris.hh:116
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:99
uint64_t st_rdev
device number
Definition: solaris.hh:73
uint64_t ino_t
Definition: solaris.hh:53
uint64_t off_t
Definition: solaris.hh:48
void tgt_stat
Stat buffer.
int32_t uid_t
Definition: solaris.hh:50
int64_t st_size
file size in bytes
Definition: solaris.hh:93
uint64_t st_dev
device
Definition: solaris.hh:86
int32_t st_gid
owner&#39;s group ID
Definition: solaris.hh:72
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
int64_t st_mtimeX
Definition: solaris.hh:78
int64_t st_mtimeX
Definition: solaris.hh:97
int64_t st_size
file size in bytes
Definition: solaris.hh:74
int32_t st_uid
owner&#39;s user ID
Definition: solaris.hh:90
uint64_t size_t
Basic Solaris types.
Definition: solaris.hh:47
int32_t st_uid
owner&#39;s user ID
Definition: solaris.hh:71
uint32_t mode_t
Definition: solaris.hh:55
uint64_t st_ino
inode
Definition: solaris.hh:68
uint64_t rlim_t
Definition: solaris.hh:52
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: solaris.hh:40
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:98
uint64_t dev_t
Definition: solaris.hh:54
uint32_t st_nlink
link count
Definition: solaris.hh:70
struct Solaris::utsname utsname
Interface struct for uname().

Generated on Mon Jun 8 2020 15:45:07 for gem5 by doxygen 1.8.13