misc: Fix coding style for struct's opening braces
The systemc dir was not included in this fix.
First it was identified that there were only occurrences
at 0, 1, 2 and 3 levels of indentation (and a single
occurrence of 2 and 3 spaces), using:
grep -nrE --exclude-dir=systemc \
"^ *struct [A-Za-z].* {$" src/
Then the following commands were run to replace:
<indent level>struct X ... {
by:
<indent level>struct X ...
<indent level>{
Level 0:
grep -nrl --exclude-dir=systemc
"^struct [A-Za-z].* {$" src/ | \
xargs sed -Ei \
's/^struct ([A-Za-z].*) \{$/struct \1\n\{/g'
Level 1:
grep -nrl --exclude-dir=systemc \
"^ struct [A-Za-z].* {$" src/ | \
xargs sed -Ei \
's/^ struct ([A-Za-z].*) \{$/ struct \1\n \{/g'
and so on.
Change-Id: I362ef58c86912dabdd272c7debb8d25d587cd455
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39017
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
f96de41fcf
commit
2922f763e1
@@ -43,7 +43,8 @@
|
||||
#include "sim/byteswap.hh"
|
||||
#include "sim/system.hh"
|
||||
|
||||
struct M5_ATTR_PACKED DmesgEntry {
|
||||
struct M5_ATTR_PACKED DmesgEntry
|
||||
{
|
||||
uint64_t ts_nsec;
|
||||
uint16_t len;
|
||||
uint16_t text_len;
|
||||
|
||||
@@ -108,7 +108,8 @@ class Linux : public OperatingSystem
|
||||
static const int _SYS_NMLN = 65;
|
||||
|
||||
/// Interface struct for uname().
|
||||
struct utsname {
|
||||
struct utsname
|
||||
{
|
||||
char sysname[_SYS_NMLN]; //!< System name.
|
||||
char nodename[_SYS_NMLN]; //!< Node name.
|
||||
char release[_SYS_NMLN]; //!< OS release.
|
||||
@@ -117,19 +118,22 @@ class Linux : public OperatingSystem
|
||||
};
|
||||
|
||||
/// Limit struct for getrlimit/setrlimit.
|
||||
struct rlimit {
|
||||
struct rlimit
|
||||
{
|
||||
uint64_t rlim_cur; //!< soft limit
|
||||
uint64_t rlim_max; //!< hard limit
|
||||
};
|
||||
|
||||
/// For gettimeofday().
|
||||
struct timeval {
|
||||
struct timeval
|
||||
{
|
||||
int64_t tv_sec; //!< seconds
|
||||
int64_t tv_usec; //!< microseconds
|
||||
};
|
||||
|
||||
/// For clock_gettime().
|
||||
struct timespec {
|
||||
struct timespec
|
||||
{
|
||||
time_t tv_sec; //!< seconds
|
||||
int64_t tv_nsec; //!< nanoseconds
|
||||
};
|
||||
@@ -138,7 +142,8 @@ class Linux : public OperatingSystem
|
||||
static const int M5_SC_CLK_TCK = 100;
|
||||
|
||||
/// For times().
|
||||
struct tms {
|
||||
struct tms
|
||||
{
|
||||
int64_t tms_utime; //!< user time
|
||||
int64_t tms_stime; //!< system time
|
||||
int64_t tms_cutime; //!< user time of children
|
||||
@@ -146,7 +151,8 @@ class Linux : public OperatingSystem
|
||||
};
|
||||
|
||||
// For writev/readv
|
||||
struct tgt_iovec {
|
||||
struct tgt_iovec
|
||||
{
|
||||
uint64_t iov_base; // void *
|
||||
uint64_t iov_len;
|
||||
};
|
||||
@@ -211,7 +217,8 @@ class Linux : public OperatingSystem
|
||||
static const int TGT_RUSAGE_CHILDREN = -1;
|
||||
static const int TGT_RUSAGE_BOTH = -2;
|
||||
|
||||
struct rusage {
|
||||
struct rusage
|
||||
{
|
||||
struct timeval ru_utime; //!< user time used
|
||||
struct timeval ru_stime; //!< system time used
|
||||
int64_t ru_maxrss; //!< max rss
|
||||
|
||||
Reference in New Issue
Block a user