Commit 9040e1af authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added some const in some functions

parent 91e9c0b4
......@@ -179,7 +179,7 @@ hg_bool_t margo_is_listening(
*/
void margo_push_prefinalize_callback(
margo_instance_id mid,
void(*cb)(void*),
margo_finalize_callback_t cb,
void* uargs);
/**
......@@ -225,7 +225,7 @@ int margo_top_prefinalize_callback(
*/
void margo_provider_push_prefinalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t cb,
void* uargs);
......@@ -239,7 +239,7 @@ void margo_provider_push_prefinalize_callback(
*/
int margo_provider_pop_prefinalize_callback(
margo_instance_id mid,
void* owner);
const void* owner);
/**
* @brief Get the last prefinalize callback that was pushed into the margo instance
......@@ -253,7 +253,7 @@ int margo_provider_pop_prefinalize_callback(
*/
int margo_provider_top_prefinalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t *cb,
void** uargs);
......@@ -321,7 +321,7 @@ int margo_top_finalize_callback(
*/
void margo_provider_push_finalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t cb,
void* uargs);
......@@ -335,7 +335,7 @@ void margo_provider_push_finalize_callback(
*/
int margo_provider_pop_finalize_callback(
margo_instance_id mid,
void* owner);
const void* owner);
/**
* @brief Gets the last finalize callback that was pushed into the margo instance
......@@ -351,7 +351,7 @@ int margo_provider_pop_finalize_callback(
*/
int margo_provider_top_finalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t *cb,
void** uargs);
......
......@@ -82,7 +82,7 @@ struct margo_handle_cache_el
struct margo_finalize_cb
{
void* owner;
const void* owner;
void(*callback)(void*);
void* uargs;
struct margo_finalize_cb* next;
......@@ -738,7 +738,7 @@ int margo_top_prefinalize_callback(
void margo_provider_push_prefinalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t cb,
void* uargs)
{
......@@ -757,7 +757,7 @@ void margo_provider_push_prefinalize_callback(
int margo_provider_top_prefinalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t *cb,
void** uargs)
{
......@@ -773,14 +773,14 @@ int margo_provider_top_prefinalize_callback(
} else {
prev->next = fcb->next;
}
*cb = fcb->callback;
*uargs = fcb->uargs;
if(cb) *cb = fcb->callback;
if(uargs) *uargs = fcb->uargs;
return 1;
}
int margo_provider_pop_prefinalize_callback(
margo_instance_id mid,
void* owner)
const void* owner)
{
struct margo_finalize_cb* prev = NULL;
struct margo_finalize_cb* fcb = mid->prefinalize_cb;
......@@ -826,7 +826,7 @@ int margo_top_finalize_callback(
void margo_provider_push_finalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t cb,
void* uargs)
{
......@@ -845,7 +845,7 @@ void margo_provider_push_finalize_callback(
int margo_provider_pop_finalize_callback(
margo_instance_id mid,
void* owner)
const void* owner)
{
struct margo_finalize_cb* prev = NULL;
struct margo_finalize_cb* fcb = mid->finalize_cb;
......@@ -865,7 +865,7 @@ int margo_provider_pop_finalize_callback(
int margo_provider_top_finalize_callback(
margo_instance_id mid,
void* owner,
const void* owner,
margo_finalize_callback_t *cb,
void** uargs)
{
......@@ -881,8 +881,8 @@ int margo_provider_top_finalize_callback(
} else {
prev->next = fcb->next;
}
*cb = fcb->callback;
*uargs = fcb->uargs;
if(cb) *cb = fcb->callback;
if(uargs) *uargs = fcb->uargs;
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment