gem5  v20.1.0.0
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 {
113  } utsname;
114 
115  // for *at syscalls
116  static const int TGT_AT_FDCWD = -100;
117 
118 }; // class Solaris
119 
120 #endif // __SOLARIS_HH__
Solaris::tgt_stat64::st_ino
uint64_t st_ino
inode
Definition: solaris.hh:87
Solaris::tgt_stat::st_ino
uint64_t st_ino
inode
Definition: solaris.hh:68
Solaris::tgt_stat::st_blocks
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:80
Solaris::time_t
int64_t time_t
Definition: solaris.hh:49
Solaris::tgt_timespec
Definition: solaris.hh:59
Solaris::tgt_stat64::st_nlink
uint32_t st_nlink
link count
Definition: solaris.hh:89
Solaris::size_t
uint64_t size_t
Basic Solaris types.
Definition: solaris.hh:47
Solaris::tgt_stat64::st_blksize
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:98
Solaris::tgt_stat64::st_mode
uint32_t st_mode
mode
Definition: solaris.hh:88
Solaris::tgt_stat::st_mode
uint32_t st_mode
mode
Definition: solaris.hh:69
Solaris::tgt_stat::st_rdev
uint64_t st_rdev
device number
Definition: solaris.hh:73
OperatingSystem
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: operatingsystem.hh:52
OperatingSystem::tgt_stat64
void tgt_stat64
Definition: operatingsystem.hh:62
Solaris::dev_t
uint64_t dev_t
Definition: solaris.hh:54
Solaris::tgt_timespec::tv_sec
int64_t tv_sec
Definition: solaris.hh:60
Solaris::tgt_stat64::st_gid
int32_t st_gid
owner's group ID
Definition: solaris.hh:91
Solaris::mode_t
uint32_t mode_t
Definition: solaris.hh:55
Solaris::tgt_stat64::st_dev
uint64_t st_dev
device
Definition: solaris.hh:86
Solaris::uid_t
int32_t uid_t
Definition: solaris.hh:50
Solaris::tgt_stat64::st_rdev
uint64_t st_rdev
device number
Definition: solaris.hh:92
Solaris
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: solaris.hh:40
Solaris::gid_t
int32_t gid_t
Definition: solaris.hh:51
Solaris::tgt_stat::st_nlink
uint32_t st_nlink
link count
Definition: solaris.hh:70
Solaris::utsname::machine
char machine[_SYS_NMLN]
Machine type.
Definition: solaris.hh:112
Solaris::tgt_stat::st_size
int64_t st_size
file size in bytes
Definition: solaris.hh:74
Solaris::TGT_AT_FDCWD
static const int TGT_AT_FDCWD
Definition: solaris.hh:116
Solaris::_SYS_NMLN
static const int _SYS_NMLN
Length of strings in struct utsname (plus 1 for null char).
Definition: solaris.hh:104
Solaris::off_t
uint64_t off_t
Definition: solaris.hh:48
Solaris::tgt_stat64::st_blocks
int64_t st_blocks
number of blocks allocated
Definition: solaris.hh:99
operatingsystem.hh
Solaris::utsname
struct Solaris::utsname utsname
Interface struct for uname().
Solaris::tgt_stat::st_gid
int32_t st_gid
owner's group ID
Definition: solaris.hh:72
Solaris::tgt_stat::st_mtimeX
int64_t st_mtimeX
Definition: solaris.hh:78
Solaris::rlim_t
uint64_t rlim_t
Definition: solaris.hh:52
Solaris::utsname::sysname
char sysname[_SYS_NMLN]
System name.
Definition: solaris.hh:108
Solaris::utsname::release
char release[_SYS_NMLN]
OS release.
Definition: solaris.hh:110
Solaris::tgt_stat64::st_size
int64_t st_size
file size in bytes
Definition: solaris.hh:93
Solaris::tgt_stat64::st_mtimeX
int64_t st_mtimeX
Definition: solaris.hh:97
Solaris::utsname
Interface struct for uname().
Definition: solaris.hh:107
types.hh
Solaris::tgt_stat::st_blksize
int32_t st_blksize
optimal I/O block size
Definition: solaris.hh:79
Solaris::tgt_stat64::st_uid
int32_t st_uid
owner's user ID
Definition: solaris.hh:90
OperatingSystem::tgt_stat
void tgt_stat
Stat buffer.
Definition: operatingsystem.hh:59
Solaris::utsname::nodename
char nodename[_SYS_NMLN]
Node name.
Definition: solaris.hh:109
Solaris::tgt_stat::st_uid
int32_t st_uid
owner's user ID
Definition: solaris.hh:71
Solaris::ino_t
uint64_t ino_t
Definition: solaris.hh:53
Solaris::tgt_timespec::tv_nsec
int64_t tv_nsec
Definition: solaris.hh:61
Solaris::nlink_t
uint32_t nlink_t
Definition: solaris.hh:56
Solaris::utsname::version
char version[_SYS_NMLN]
OS version.
Definition: solaris.hh:111
Solaris::tgt_stat::st_dev
uint64_t st_dev
device
Definition: solaris.hh:67

Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17