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
2ae1ca5d
Commit
2ae1ca5d
authored
Jun 18, 2022
by
Antoine Kaufmann
Browse files
lib/simbricks/base: Send termination message in SimbricksBaseIfClose()
parent
b4dcbc81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/simbricks/base/if.c
lib/simbricks/base/if.c
+4
-2
No files found.
lib/simbricks/base/if.c
View file @
2ae1ca5d
...
@@ -809,8 +809,10 @@ void SimbricksBaseIfClose(struct SimbricksBaseIf *base_if)
...
@@ -809,8 +809,10 @@ void SimbricksBaseIfClose(struct SimbricksBaseIf *base_if)
}
}
if
(
base_if
->
conn_state
==
kConnOpen
)
{
if
(
base_if
->
conn_state
==
kConnOpen
)
{
/* send out sync with max time stamp so no one else is stuck */
// send out termination message
while
(
SimbricksBaseIfOutSync
(
base_if
,
UINT64_MAX
)
!=
0
);
volatile
union
SimbricksProtoBaseMsg
*
msg
;
while
((
msg
=
SimbricksBaseIfOutAlloc
(
base_if
,
UINT64_MAX
))
==
NULL
);
SimbricksBaseIfOutSend
(
base_if
,
msg
,
SIMBRICKS_PROTO_MSG_TYPE_TERMINATE
);
}
}
close
(
base_if
->
conn_fd
);
close
(
base_if
->
conn_fd
);
...
...
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