Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
mona
Commits
55f4b58b
Commit
55f4b58b
authored
Nov 11, 2020
by
Matthieu Dorier
Browse files
mona_wait and mona_test now check if the request is NULL
parent
d16d3801
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mona-types.h
View file @
55f4b58b
...
...
@@ -213,6 +213,8 @@ static inline na_return_t mona_wait_internal(mona_request_t req)
na_return_t
*
waited_na_ret
=
NULL
;
na_return_t
na_ret
=
NA_SUCCESS
;
if
(
req
==
MONA_REQUEST_NULL
)
return
NA_INVALID_ARG
;
ABT_eventual_wait
(
req
->
eventual
,
(
void
**
)
&
waited_na_ret
);
na_ret
=
*
waited_na_ret
;
ABT_eventual_free
(
&
(
req
->
eventual
));
...
...
src/mona.c
View file @
55f4b58b
...
...
@@ -394,12 +394,14 @@ mona_msg_init_unexpected(mona_instance_t mona, void* buf, na_size_t buf_size)
na_return_t
mona_wait
(
mona_request_t
req
)
{
na_return_t
na_ret
=
mona_wait_internal
(
req
);
free
(
req
);
if
(
na_ret
==
NA_SUCCESS
)
free
(
req
);
return
na_ret
;
}
int
mona_test
(
mona_request_t
req
,
int
*
flag
)
{
if
(
req
==
MONA_REQUEST_NULL
)
return
ABT_ERR_INV_ARG
;
return
ABT_eventual_test
(
req
->
eventual
,
NULL
,
flag
);
}
...
...
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