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

Generated on Fri Jun 9 2017 13:03:40 for gem5 by doxygen 1.8.6