Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
05de0b1d
Commit
05de0b1d
authored
Aug 20, 2021
by
Antoine Kaufmann
Browse files
lib/nicbm: clean up warnings for full queues
Only show one message when we start to wait, and one when we succeeded.
parent
832c5d43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
lib/simbricks/nicbm/nicbm.cc
lib/simbricks/nicbm/nicbm.cc
+18
-2
No files found.
lib/simbricks/nicbm/nicbm.cc
View file @
05de0b1d
...
...
@@ -84,17 +84,33 @@ static void sigusr2_handler(int dummy) {
volatile
union
SimbricksProtoPcieD2H
*
Runner
::
D2HAlloc
()
{
volatile
union
SimbricksProtoPcieD2H
*
msg
;
bool
first
=
true
;
while
((
msg
=
SimbricksNicIfD2HAlloc
(
&
nicif_
,
main_time
))
==
NULL
)
{
fprintf
(
stderr
,
"D2HAlloc: no entry available
\n
"
);
if
(
first
)
{
fprintf
(
stderr
,
"D2HAlloc: warning waiting for entry
\n
"
);
first
=
false
;
}
}
if
(
!
first
)
fprintf
(
stderr
,
"D2HAlloc: entry successfully allocated
\n
"
);
return
msg
;
}
volatile
union
SimbricksProtoNetD2N
*
Runner
::
D2NAlloc
()
{
volatile
union
SimbricksProtoNetD2N
*
msg
;
bool
first
=
true
;
while
((
msg
=
SimbricksNicIfD2NAlloc
(
&
nicif_
,
main_time
))
==
NULL
)
{
fprintf
(
stderr
,
"D2NAlloc: no entry available
\n
"
);
if
(
first
)
{
fprintf
(
stderr
,
"D2NAlloc: warning waiting for entry
\n
"
);
first
=
false
;
}
}
if
(
!
first
)
fprintf
(
stderr
,
"D2NAlloc: entry successfully allocated
\n
"
);
return
msg
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment