Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chuck cranor
margo
Commits
95bdea25
Commit
95bdea25
authored
Dec 17, 2015
by
Jonathan Jenkins
Browse files
add convenience NULL define for margo id
parent
cfd6bf7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/margo.h
View file @
95bdea25
...
...
@@ -21,6 +21,8 @@ extern "C" {
struct
margo_instance
;
typedef
struct
margo_instance
*
margo_instance_id
;
#define MARGO_INSTANCE_NULL ((margo_instance_id)NULL)
/**
* Initializes margo library from given argobots and Mercury instances.
* @param [in] progress_pool Argobots pool to drive communication
...
...
src/margo.c
View file @
95bdea25
...
...
@@ -54,11 +54,11 @@ margo_instance_id margo_init(ABT_pool progress_pool, ABT_pool handler_pool,
struct
margo_instance
*
mid
;
if
(
handler_mapping_table_size
>=
MAX_HANDLER_MAPPING
)
return
(
NULL
);
return
(
MARGO_INSTANCE_
NULL
);
mid
=
malloc
(
sizeof
(
*
mid
));
if
(
!
mid
)
return
(
NULL
);
return
(
MARGO_INSTANCE_
NULL
);
memset
(
mid
,
0
,
sizeof
(
*
mid
));
mid
->
progress_pool
=
progress_pool
;
...
...
@@ -72,7 +72,7 @@ margo_instance_id margo_init(ABT_pool progress_pool, ABT_pool handler_pool,
{
fprintf
(
stderr
,
"Error: ABT_thread_create()
\n
"
);
free
(
mid
);
return
(
NULL
);
return
(
MARGO_INSTANCE_
NULL
);
}
handler_mapping_table
[
handler_mapping_table_size
].
mid
=
mid
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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