Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 654814d

Browse files
committed
Since RequestTag's arrival variable is only needed when using delayed
tag calculation, protect all references to the variable with DO_NOT_DELAY_TAG_CALC. Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
1 parent 79c2093 commit 654814d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/dmclock_server.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ namespace crimson {
101101
double proportion;
102102
double limit;
103103
bool ready; // true when within limit
104+
#ifndef DO_NOT_DELAY_TAG_CALC
104105
Time arrival;
106+
#endif
105107

106108
RequestTag(const RequestTag& prev_tag,
107109
const ClientInfo& client,
@@ -124,6 +126,9 @@ namespace crimson {
124126
req_params.delta,
125127
false)),
126128
ready(false)
129+
#ifndef DO_NOT_DELAY_TAG_CALC
130+
, arrival(time)
131+
#endif
127132
{
128133
assert(reservation < max_tag || proportion < max_tag);
129134
}
@@ -132,8 +137,10 @@ namespace crimson {
132137
reservation(_res),
133138
proportion(_prop),
134139
limit(_lim),
135-
ready(false),
136-
arrival(_arrival)
140+
ready(false)
141+
#ifndef DO_NOT_DELAY_TAG_CALC
142+
, arrival(_arrival)
143+
#endif
137144
{
138145
assert(reservation < max_tag || proportion < max_tag);
139146
}
@@ -142,8 +149,10 @@ namespace crimson {
142149
reservation(other.reservation),
143150
proportion(other.proportion),
144151
limit(other.limit),
145-
ready(other.ready),
146-
arrival(other.arrival)
152+
ready(other.ready)
153+
#ifndef DO_NOT_DELAY_TAG_CALC
154+
, arrival(other.arrival)
155+
#endif
147156
{
148157
// empty
149158
}

0 commit comments

Comments
 (0)