gem5  v21.1.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 
35 namespace gem5
36 {
37 
43 class Solaris : public OperatingSystem
44 {
45 
46  public:
47 
49  typedef uint64_t size_t;
51  typedef uint64_t off_t;
52  typedef int64_t time_t;
53  typedef int32_t uid_t;
54  typedef int32_t gid_t;
55  typedef uint64_t rlim_t;
56  typedef uint64_t ino_t;
57  typedef uint64_t dev_t;
58  typedef uint32_t mode_t;
59  typedef uint32_t nlink_t;
61 
62  struct tgt_timespec
63  {
64  int64_t tv_sec;
65  int64_t tv_nsec;
66  };
67 
70  struct tgt_stat
71  {
72  uint64_t st_dev;
73  uint64_t st_ino;
74  uint32_t st_mode;
75  uint32_t st_nlink;
76  int32_t st_uid;
77  int32_t st_gid;
78  uint64_t st_rdev;
79  int64_t st_size;
80  //struct tgt_timespec st_atimeX; //!< time of last access
81  //struct tgt_timespec st_mtimeX; //!< time of last modification
82  //struct tgt_timespec st_ctimeX; //!< time of last status change
84  int32_t st_blksize;
85  int64_t st_blocks;
86  char st_fstype[16];
87  };
88 
89  // same for stat64
90  struct tgt_stat64
91  {
92  uint64_t st_dev;
93  uint64_t st_ino;
94  uint32_t st_mode;
95  uint32_t st_nlink;
96  int32_t st_uid;
97  int32_t st_gid;
98  uint64_t st_rdev;
99  int64_t st_size;
100  //struct tgt_timespec st_atimeX; //!< time of last access
101  //struct tgt_timespec st_mtimeX; //!< time of last modification
102  //struct tgt_timespec st_ctimeX; //!< time of last status change
104  int32_t st_blksize;
105  int64_t st_blocks;
106  char st_fstype[16];
107  };
108 
110  static const int _SYS_NMLN = 257;
111 
113  struct utsname
114  {
120  };
121 
122  // for *at syscalls
123  static const int TGT_AT_FDCWD = -100;
124 
125 }; // class Solaris
126 
127 } // namespace gem5
128 
129 #endif // __SOLARIS_HH__
gem5::Solaris::tgt_stat64::st_nlink
uint32_t st_nlink
link count
Definition: solaris.hh:95
gem5::Solaris::tgt_stat64
Definition: solaris.hh:90
gem5::Solaris::utsname::version
char version[_SYS_NMLN]
OS version.
Definition: solaris.hh:118
gem5::Solaris::time_t
int64_t time_t
Definition: solaris.hh:52
gem5::Solaris::tgt_stat64::st_size
int64_t st_size
file size in bytes
Definition: solaris.hh:99
gem5::Solaris::tgt_stat
Stat buffer.
Definition: solaris.hh:70
gem5::Solaris::tgt_stat::st_dev
uint64_t st_dev
device
Definition: solaris.hh:72
gem5::Solaris::utsname
Interface struct for uname().
Definition: solaris.hh:113
gem5::Solaris::tgt_stat::st_uid
int32_t st_uid
owner's user ID
Definition: solaris.hh:76
gem5::Solaris::tgt_stat::st_ino
uint64_t st_ino
inode
Definition: solaris.hh:73
gem5::Solaris::utsname::machine
char machine[_SYS_NMLN]
Machine type.
Definition: solaris.hh:119
gem5::Solaris::tgt_timespec::tv_sec
int64_t tv_sec
Definition: solaris.hh:64
gem5::Solaris::tgt_stat64::st_ctimeX
int64_t st_ctimeX
Definition: solaris.hh:103
gem5::Solaris::tgt_stat::st_blocks
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:85
gem5::Solaris::tgt_timespec::tv_nsec
int64_t tv_nsec
Definition: solaris.hh:65
gem5::Solaris::TGT_AT_FDCWD
static const int TGT_AT_FDCWD
Definition: solaris.hh:123
gem5::Solaris::tgt_stat::st_blksize
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:84
gem5::Solaris::tgt_stat64::st_atimeX
int64_t st_atimeX
Definition: solaris.hh:103
gem5::Solaris::tgt_stat::st_fstype
char st_fstype[16]
Definition: solaris.hh:86
gem5::Solaris::tgt_stat64::st_rdev
uint64_t st_rdev
device number
Definition: solaris.hh:98
gem5::Solaris::tgt_stat::st_ctimeX
int64_t st_ctimeX
Definition: solaris.hh:83
gem5::Solaris::dev_t
uint64_t dev_t
Definition: solaris.hh:57
gem5::Solaris::tgt_stat64::st_dev
uint64_t st_dev
device
Definition: solaris.hh:92
gem5::OperatingSystem
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: operatingsystem.hh:47
gem5::Solaris::gid_t
int32_t gid_t
Definition: solaris.hh:54
gem5::Solaris::rlim_t
uint64_t rlim_t
Definition: solaris.hh:55
gem5::Solaris::tgt_stat64::st_fstype
char st_fstype[16]
Definition: solaris.hh:106
gem5::Solaris
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: solaris.hh:43
gem5::Solaris::_SYS_NMLN
static const int _SYS_NMLN
Length of strings in struct utsname (plus 1 for null char).
Definition: solaris.hh:110
gem5::Solaris::ino_t
uint64_t ino_t
Definition: solaris.hh:56
gem5::Solaris::mode_t
uint32_t mode_t
Definition: solaris.hh:58
gem5::Solaris::tgt_stat::st_gid
int32_t st_gid
owner's group ID
Definition: solaris.hh:77
operatingsystem.hh
gem5::Solaris::tgt_stat64::st_mtimeX
int64_t st_mtimeX
Definition: solaris.hh:103
gem5::Solaris::tgt_stat::st_atimeX
int64_t st_atimeX
Definition: solaris.hh:83
gem5::Solaris::uid_t
int32_t uid_t
Definition: solaris.hh:53
gem5::Solaris::tgt_stat::st_mode
uint32_t st_mode
mode
Definition: solaris.hh:74
gem5::Solaris::tgt_stat::st_size
int64_t st_size
file size in bytes
Definition: solaris.hh:79
gem5::Solaris::tgt_stat64::st_gid
int32_t st_gid
owner's group ID
Definition: solaris.hh:97
gem5::Solaris::tgt_stat64::st_mode
uint32_t st_mode
mode
Definition: solaris.hh:94
gem5::Solaris::tgt_stat64::st_blksize
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:104
gem5::Solaris::tgt_stat64::st_uid
int32_t st_uid
owner's user ID
Definition: solaris.hh:96
gem5::Solaris::tgt_stat::st_mtimeX
int64_t st_mtimeX
Definition: solaris.hh:83
types.hh
gem5::Solaris::tgt_stat64::st_blocks
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:105
gem5::Solaris::nlink_t
uint32_t nlink_t
Definition: solaris.hh:59
gem5::Solaris::tgt_stat::st_rdev
uint64_t st_rdev
device number
Definition: solaris.hh:78
gem5::Solaris::tgt_stat::st_nlink
uint32_t st_nlink
link count
Definition: solaris.hh:75
gem5::Solaris::tgt_timespec
Definition: solaris.hh:62
gem5::Solaris::off_t
uint64_t off_t
Definition: solaris.hh:51
gem5::Solaris::utsname::sysname
char sysname[_SYS_NMLN]
System name.
Definition: solaris.hh:115
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::Solaris::utsname::release
char release[_SYS_NMLN]
OS release.
Definition: solaris.hh:117
gem5::Solaris::tgt_stat64::st_ino
uint64_t st_ino
inode
Definition: solaris.hh:93
gem5::Solaris::utsname::nodename
char nodename[_SYS_NMLN]
Node name.
Definition: solaris.hh:116
gem5::Solaris::size_t
uint64_t size_t
Basic Solaris types.
Definition: solaris.hh:50

Generated on Tue Sep 21 2021 12:24:51 for gem5 by doxygen 1.8.17